You are correct in thinking this.
Because the columns of the final matrix are independent (they're known to form the canonical basis of
Another way of doing it was to calculate the determinant of the matrix
(see the code, he's much easier)
If the determinant is not 0, then the vectors are linearly independent.