Irrational Number has Periodic Continued Fraction iff Quadratic

Theorem
Let $$x$$ be an irrational number.

Then $$x$$ is a quadratic irrational iff its continued fraction expansion is periodic.