What's the rank of the matrix $M=\begin{pmatrix} 1 & 0 & 1\\ 1 & 1 & 0\\ 0 & 1 & \alpha \end{pmatrix}$ where $\alpha \in \mathbb{R}$?
I'm not sure how this is solved correctly, when it's dependent from $\alpha$.
Here is what I tried:
Multiply second line with $-1$ and add the first line to it, we get:
$\begin{pmatrix} 1 & 0 & 1\\ 0 & -1 & 1\\ 0 & 1 & \alpha \end{pmatrix}$
Now take second line and add it to third line:
$\begin{pmatrix} 1 & 0 & 1\\ 0 & -1 & 1\\ 0 & 0 & \alpha+1 \end{pmatrix}$
$\text{rank}(M)=2$ if $\alpha=-1$, else $\text{rank}(M)=3$
I hope this is alright?
This is correct. The definition of rank can be
So for example if you use Gauss elimination as you did above and get a matrix such that one of the lines have all elements zero you would have that this line doesn't count on the rank. Other, completely equivalent, and more theoretical, definition is that
This is the same, you could take the columns as vectors in a vector space and see if they are linearly independent, form a base and see the dimension of the space formed.
Thinking in the definition what you did is completely correct because that you used Gauss elimination to put the matrix in echelon form and then counted the number of lines with all elements equal zero depending on what $\alpha$ is