Finding the rank of a matrix whose entries depend on a parameter Determine the rank of $A$ for all values of the parameter $x$. Use the relevant theory to support
your answer.
$$A = \begin{bmatrix}x&0&x^2-2\\0&1&1\\-1&x&x-1\end{bmatrix}$$
That's the full question. I have been trying to manipulate it into echelon form but I'm not making any progress. Any help would be appreciated.

The first two columns are linearly independent for all values of $x$ (can you see why?). So the question remains about the third. When does there exist constants $a, b$ such that $a(x,0, -1) + b(0, 1, x) = (x^2-2, 1, x-1)$? This amounts to solving the system
\begin{align}
ax &= x^2-2 \\
b &= 1 \\
bx-a &= x-1
\end{align}
Substituting the second equation into the third yields $x-a = x-1 \implies a = 1$. Hence the first equation reduces to $x^2-x-2 = (x+1)(x-2) = 0$. This means that for $x = -1$ and $x = 2$, the third column is a linear combination of the two others, meaning that the matrix has rank $2$. Otherwise, all columns are linearly independent and the rank is $3$.
