Find matrix rank

linear algebramatricesmatrix-rank

I have a following matrix:

\begin{bmatrix}0&0&-1&5\\0&0&-3&8\\0&0&1&2\\\end{bmatrix}

After: Multiply first two rows by -1 and add first and third row together I get this:

\begin{bmatrix}0&0&-1&5\\0&0&-3&8\\0&0&0&7\\\end{bmatrix}

After: Subtract second row from the first multiplied by 3, I get this:

\begin{bmatrix}0&0&-1&5\\0&0&0&7\\0&0&0&7\\\end{bmatrix}

Therefore I could subtract second and third row and get only one non zero row, which would mean that the rank of the matrix is one. But the rank of this matrix is 2, according to the solution. What am I doing wrong? I've been several times over this.

Best Answer

You are on the right track, but you have got a bit tangled up in the negatives. See below for the full steps to take to get to a rank of $2$

\begin{align} &\color{white}=\begin{pmatrix}0&0&-1&5\\ 0&0&-3&8\\ 0&0&1&2\end{pmatrix}\\\\ &= \begin{pmatrix}0&0&1&-5\\ 0&0&-3&8\\ 0&0&1&2\end{pmatrix}\tag{$R_1=-R_1$}\\\\ &=\begin{pmatrix}0&0&1&-5\\ 0&0&0&-7\\ 0&0&1&2\end{pmatrix}\tag{$R_2=R_2+3R_1$}\\\\ &=\begin{pmatrix}0&0&1&-5\\ 0&0&0&-7\\ 0&0&0&7\end{pmatrix}\tag{$R_3=R_3-R_1$}\\\\ &=\begin{pmatrix}0&0&1&-5\\ 0&0&0&1\\ 0&0&0&7\tag{$R_2=-\frac17 R_2$}\end{pmatrix}\\\\ &=\begin{pmatrix}0&0&1&-5\\ 0&0&0&1\\ 0&0&0&0\tag{$R_3=R_3 -7R_2$}\end{pmatrix} \end{align}