The story
From academic writing. One of the first known recorded occurrences of this phrase is in An Elementary Course of Mathematics by Thomas Stephens Davies, Stephen Fenwick, and William Rutherford from 1853.
Etymology from Wiktionary, CC BY-SA 4.0.