Old English hæt "hat, head covering" (variously glossing Latin pileus, galerus, mitra, tiara), from Proto-Germanic *hattuz "hood, cowl" (source also of Frisian hat, Old Norse hattr, höttr "a hood or cowl"), of uncertain etymology; it has been compared with Lithuanian kuodas "tuft or crest of a bird" and Latin cassis "helmet" (but this is said to be from Etruscan).
To throw (one's) hat in the ring was originally (1847) to take up a challenge in prize-fighting. To eat one's hat (1770), expressing what one will do if something he considers a sure thing turns out not to be, is said to have been originally eat Old Rowley's [Charles II's] hat.
box n.1
"rectangular wooden container," usually with a lid, Old English box, also the name of a type of shrub, from Late Latin buxis, from Greek pyxis "boxwood," pyxion "writing table, box," made of boxwood, from pyxos "box tree," which is of uncertain origin. Beekes suggests a loan-word from Italy, as that is where the tree is native. Dutch bus, German Büchse "box; barrel of a gun," also are Latin loan-words.
The meaning "compartment at a theater" is from c. 1600 (box seat in the theatrical sense is by 1850). The meaning "pigeon-hole at a post office" is from 1832. The meaning "television" is from 1950 (earlier "gramophone player," 1924). The meaning "station of a player in baseball" is from 1881. The graphics sense of "space enclosed within borders and rules" is from 1929. The slang meaning "vulva" is attested 17c., according to "Dictionary of American Slang;" modern use seems to date from c. World War II, perhaps originally Australian, on the notion of box of tricks. Box lunch (n.) is attested from 1899. The box set "multiple-album, CD or cassette issue of the work of an artist" is attested by 1955. To think or act outside the box "contrary to convention" is attested by 1994.