TITLE: If the number $x$ is algebraic, then $x^2$ is also algebraic
QUESTION [13 upvotes]: Prove that if the number $x$ is algebraic, then $x^2$ is also algebraic. I understand that an algebraic number can be written as a polynomial that is equal to $0$. However, I'm baffled when showing how $x^2$ is also algebraic.

REPLY [2 votes]: Basically $P(x)\cdot P(-x)= Q(x^2)$, a polynomial in $x^2$. A similar trick using $n$-th roots of $1$ allows us to get $P(x) \cdot P_1(x) = Q(x^n)$ for some $Q$ so an equation for $x^n$. To get an equation satisfied by a general $\phi(x)$ ( $\phi(x) = x^2$ in the above example) we  can use the companion matrix as @Julian Rosen: wrote in his answer. Here is a concrete example: We know that $2 x^5 + x-2=0$. We want the equation satisfied by $\phi(x) = x^3 - x^2 -1$.
Consider the companion matrix (see http://en.wikipedia.org/wiki/Companion_matrix)
\begin{eqnarray}
A = \left(
\begin{array}{ccccc}
0 & 0 & 0 &0 &1 \\
1 & 0 & 0 &0 &-\frac{1}{2}\\
0 & 1 & 0 &0 &0\\
0 & 0 & 1 &0 &0\\
0 & 0 & 0 &1 &0\\
\end{array} \right)
\end{eqnarray}
Take $\phi(A) = A^3 - A^2 -I_5 = B$ where 
\begin{eqnarray}
B = \left(
\begin{array}{ccccc}
-1 & 0 & 1 &-1 &0 \\
0 & -1 & -\frac{1}{2} &\frac{3}{2} &-1\\
-1 & 0 &-1 &-\frac{1}{2} &\frac{3}{2}\\
1 & -1 & 0 &-1 &-\frac{1}{2}\\
0 & 1 & -1 &0 &-1\\
\end{array} \right)
\end{eqnarray}
The characteristic polynomial of $B$ is 
$$R(t) =t^5+5 t^4+16 t^3+\frac{61}{2} t^2+\frac{271}{8}t+\frac{127}{8}$$
and one checks that 
$$R[x^3 - x^2 -1] =\frac{1}{8} (2 x^5+x-2) (4 x^10-20 x^9+40 x^8-40 x^7+18 x^6+10 x^5-16 x^4-12 x^3+23 x^2-x-2)$$
that is, $x^3 - x^2 -1$ is a root of $R(\cdot)$. 
Or, with numerics, the equation $2 x^5 + x-2=0$ has a unique real solution $0.8890618537791..$. We get $x^3 - x^2 -1 = -1.0876889476...$ and $R(-1.0876889476...) \simeq 0$
$\bf{Added}$ This method can be used to find equations for polynomial expressions involving several algebraic numbers $x_1$, $x_2$, $\ldots$ each satisfying a given equation. In that case we work with Kronecker products. This is finiteness  effective; also see @Amitai Yuval: answer.