<s>[INST] How to know the most efficient way of finding the rank of matrix and how do I apply it to this example For the matrix  $
\begin{bmatrix} 1 & 2 & -3 \\ 1 & -2 & 3 \\ 4 & 8 & -12 \\ 1 & -1 & 5 \end{bmatrix}
$
The reduced row echelon I obtained is   $
\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}
$
However, the answer is that the rank of this matrix is 2. How do I know if the rank is indeed 2?
 [/INST] Doing Gaussian Elimination, you get
$$
\begin{split}
\begin{bmatrix}
1 &  2 &  -3 \\
1 & -2 &   3 \\
4 &  8 & -12 \\
1 & -1 &   5
\end{bmatrix}
&\to
\begin{bmatrix}
1 &  2 &  -3 \\
0 &  4 &  -6 \\
0 &  0 &   0 \\
0 & -3 &   8
\end{bmatrix}
\to
\begin{bmatrix}
1 &  2 &  -3 \\
0 &  1 &  -3/2 \\
0 &  0 &   0 \\
0 & -3 &   8
\end{bmatrix}
\\ &\to
\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 0 \\
0 & 0 & 1
\end{bmatrix}
\to
\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
0 & 0 & 0
\end{bmatrix}
\end{split}
$$
so you are right, and the rank is 3. Must be a typo in the book.
</s>