I want to know the proof that the continued fraction of $\sqrt{n}$ has a period.
This question and answer prove that when the continued fraction has a period, it can be represented by quadratic form. However, it doesn't prove that the continued fraction of quadratic form have a period. According to wikipedia, Lagrange prove it.
"Amazingly, Lagrange's discovery implies that the canonical continued fraction expansion of the square root of every non-square integer is periodic"
Does anybody know how to prove this?