Rank of matrix as a function of x

linear algebramatrix-rank

Given $B$=$\begin{pmatrix}
x & 1 & 2 \\
5 & 5 & -2 \\
3 & 3 & 6 \\
1 & x & 2
\end{pmatrix}$

Find rank of matrix $B$ as a function of $x$

For finding the rank I converted the above matrix to row reduced echelon form and got the following

$\begin{pmatrix}1 & 0 & \frac{-2}{5}\frac{x+1}{x-1}\\ 0 & 1 & \frac{12}{5}\frac{1}{x-1}\\ 0 & 0 & 1\\ 0 &0 & 0\end{pmatrix}$

When $x \neq 1$ the rank of the above matrix is 3 and when $x=1$ rank of the above matrix is 2 but when $x=1$, I am getting infinite value in the last column.

Can you please let me know if the above approach to the formulation is correct?

Best Answer

When $x=1$ there are two identical columns, independent to the third column, so rank =2.

As you've seen, when $x \ne 1$, the rank is three.