%display latex
latex.matrix_delimiters(left='[', right=']')
$\newcommand{\la}{\langle}$ $\newcommand{\ra}{\rangle}$ $\newcommand{\vu}{\mathbf{u}}$ $\newcommand{\vv}{\mathbf{v}}$ $\newcommand{\vw}{\mathbf{w}}$ $\newcommand{\vzz}{\mathbf{z}}$ $\newcommand{\nc}{\newcommand}$ $\nc{\Cc}{\mathbb{C}}$ $\nc{\Rr}{\mathbb{R}}$ $\nc{\Qq}{\mathbb{Q}}$ $\nc{\Nn}{\mathbb{N}}$ $\nc{\cB}{\mathcal{B}}$ $\nc{\cE}{\mathcal{E}}$ $\nc{\cC}{\mathcal{C}}$ $\nc{\cD}{\mathcal{D}}$ $\nc{\mi}{\mathbf{i}}$ $\nc{\sp}[1]{\langle #1 \rangle}$ $\nc{\ol}[1]{\overline{#1} }$ $\nc{\norm}[1]{\left\| #1 \right\|}$ $\nc{\abs}[1]{\left| #1 \right|}$ $\nc{\vz}{\mathbf{0}}$ $\nc{\vo}{\mathbf{1}}$ $\nc{\DMO}{\DeclareMathOperator}$ $\DMO{\tr}{tr}$ $\DMO{\nullsp}{nullsp}$ $\nc{\va}{\mathbf{a}}$ $\nc{\vb}{\mathbf{b}}$ $\nc{\vx}{\mathbf{x}}$ $\nc{\ve}{\mathbf{e}}$ $\nc{\vd}{\mathbf{d}}$ $\nc{\vh}{\mathbf{h}}$ $\nc{\ds}{\displaystyle}$ $\nc{\bm}[1]{\begin{bmatrix} #1 \end{bmatrix}}$ $\nc{\gm}[2]{\bm{\mid & \cdots & \mid \\ #1 & \cdots & #2 \\ \mid & \cdots & \mid}}$ $\nc{\MN}{M_{m \times n}(K)}$ $\nc{\NM}{M_{n \times m}(K)}$ $\nc{\NP}{M_{n \times p}(K)}$ $\nc{\MP}{M_{m \times p}(K)}$ $\nc{\PN}{M_{p \times n}(K)}$ $\nc{\NN}{M_n(K)}$ $\nc{\im}{\mathrm{Im\ }}$ $\nc{\ev}{\mathrm{ev}}$ $\nc{\Hom}{\mathrm{Hom}}$ $\nc{\com}[1]{[\phantom{a}]^{#1}}$ $\nc{\rBD}[1]{ [#1]_{\cB}^{\cD}}$ $\DMO{\id}{id}$ $\DMO{\rk}{rk}$ $\DMO{\nullity}{nullity}$ $\DMO{\End}{End}$ $\DMO{\proj}{proj}$ $\nc{\GL}{\mathrm{GL}}$
A basis of a $K$-vector space $V$ is a linearly independent spanning set.
A basis with an enumeration of its members is an ordered basis.
Example 1. The set $\{\ve_i \colon 1 \le i \le n\}$ is a basis of $K^n$ where $\ve_i$ is the $i$-th column of the identity matrix $I_n$.
The ordered set $\cE_n=[\ve_1, \ldots, \ve_n]$ (with the indicated order) is called the standard basis of $K^n$.
Example 2. $\cB = [\ve_3, \ve_1, \ve_2]$ is an ordered basis of $K^3$ and $\cB \neq \cE_3$.
Identify finite (ordered) subset $A = [\va_1, \ldots, \va_m]$ of $K^n$ with the matrix, also called $A$, whose $i$-th column is the $i$-th element of $A$.
Consequently, every spanning set of $K^n$ has size at least $n$ vectors and every linearly independent subset of $K^n$ has at most $n$ vectors. Therefore,
Proposition 1. Every basis of $K^n$ must have exactly $n$ vectors.
Moreover,
Proposition 2. For a set $A$ of $n$ vectors in $K^n$, TFEA
Proof. For a square matrix $A$,
$R_A$ has no free columns ($A$ is linearly independent) $\iff R_A$ has no zero rows ($A$ is a spanning set) $\iff$ $R_A = I_n$ ($A$ is a basis of $K^n$).
Proposition 3. The identification of finite ordered subsets of $K^n$ with matrices over $K$ with $n$-rows gives a one-to-one correspondence between ordered bases of $K^n$ and elements of $\GL_n(K)$ (the group of $n \times n$ invertible matrices).
Checkpoint. Check that the following set $A$ is a basis of $K^3$.
AL = [[1,1,1],[1,1,0],[1,0,0]]; [column_matrix(aa) for aa in AL]
A = column_matrix(AL); A, A.rref()
Since the rref($A$) is $I_3$, the columns of $A$ form a basis of $K^3$.
The row rank (resp. column rank) of a matrix is defined to be the dimension of its row space (resp. column space).
Recall a rre matrix looks like: $$ \bm{1 & * & \cdots & * & 0 & 0 & * \\ & & & \cdots & & & \\ 0 & 0 & \cdots & 0 & 1 & 0 & * \\ 0 & 0 & \cdots & 0 & 0 & 1 & * \\ 0 & & \cdots & 0 & 0 & 0& 0} $$ So,
Proposition 4. For a matrix in rref
Hence row rank = column rank for any rre matrix. (in fact for any matrix as we shall see.)
Since the dimension of the nullspace of a matrix is the number of free columns in its rref, therefore
Proposition 5. For any $m \times n$ matrix $A$, nullity of $A$ + rank of $A$ = $n$.