What is the relationship between canon and cannon?
Solution 1:
They may be distantly related, but it cannot be known for certain. From etymonline.com:
cannon
1400, "tube for projectiles," from O.Fr. canon (14c.), from It. cannone "large tube," augmentive of L. canna "reed, tube" (see cane). ... Spelling not differentiated from canon till c.1800.
And Latin canna is from Greek kanna, "reed".
canon (1)
"church law," O.E., from L.L. canon, in classical L., "measuring line, rule," from Gk. kanon "any straight rod or bar; rule; standard of excellence," perhaps from [Greek] kanna "reed" (see cane). Taken in ecclesiastical sense for "decree of the Church," and as such passed through L.L. to O.E.
So cannon derived from Greek kanna "reed" (both are hollow tubes), and canon may have derived from Greek kanna "reed" (both are straight rules).
Even if these words are not connected, Anatoly Liberman's Word Origins And How We Know Them: Etymology for Everyone explains many other similar can- words are connected: cane as a walking stick, as a cane chair and as cane sugar are from a "hollow stem", from Latin canna "reed, cane, tube, pipe". Can "pot" via Latin canna "vessel", canal and channel are "pipes" via French, as is canyon a "pipe" but via Spanish. The Italian canellone and cannoli are "small tubes".
Solution 2:
It depends on which meanings you have in mind. Canon meaning, among other things, a rule, law, or decree and a body of writings is, through Latin and Old English, from the Greek κανών, meaning ‘rule’. Cannon meaning ‘gun’ has a quite different etymology. It has a core meaning of a tube, or cylindrical bore and has cognates in Provençal, Catalan, Spanish and Italian.