# Introductory Linear Algebra/Vectors and subspaces

## Vectors

### Introduction

Without distinguishing row and column vectors, we can define vectors as follows:

Definition. (Vector) Let ${\displaystyle n}$ be a positive integer. A vector is an ${\displaystyle n}$-tuple ${\displaystyle \mathbf {v} =(v_{1},v_{2},\ldots ,v_{n})}$ of real numbers. The set ${\displaystyle \mathbb {R} ^{n}}$ of all such vectors is the Euclidean space of dimension ${\displaystyle n}$.

Remark.

• We will define dimension later.
• We use a boldface letter to denote a vector. We may write ${\displaystyle {\vec {v}},{\underline {v}},{\overset {\rightharpoonup }{v}}}$ in written form.
• In particular, we use ${\displaystyle \mathbf {0} }$ to denote zero vector in which each entry is zero.
• The entries ${\displaystyle v_{1},v_{2},\ldots ,v_{k}}$ are called the coordinates or entries of ${\displaystyle \mathbf {v} }$.

A special type of vector is the standard vector.

Definition. (Standard vector) The standard vectors in ${\displaystyle \mathbb {R} ^{n}}$ are ${\displaystyle \mathbf {e} _{j}}$ whose ${\displaystyle j}$th entry is ${\displaystyle 1}$ and all other entries are ${\displaystyle 0}$, in which ${\displaystyle j\in \{1,\ldots ,n\}}$

Remark.

• In ${\displaystyle \mathbb {R} ^{2}}$, ${\displaystyle \mathbf {e} _{1}}$ and ${\displaystyle \mathbf {e} _{2}}$ are usually denoted by ${\displaystyle \mathbf {i} }$ and ${\displaystyle \mathbf {j} }$ respectively.
• In ${\displaystyle \mathbb {R} ^{3}}$, ${\displaystyle \mathbf {e} _{1}}$, ${\displaystyle \mathbf {e} _{2}}$ and ${\displaystyle \mathbf {e} _{3}}$ are usually denoted by ${\displaystyle \mathbf {i} }$, ${\displaystyle \mathbf {j} }$ and ${\displaystyle \mathbf {k} }$ respectively.

Example.

• In ${\displaystyle \mathbb {R} ^{4}}$, ${\displaystyle \mathbf {e} _{3}=(0,0,1,0)}$.
• In ${\displaystyle \mathbb {R} ^{3}}$, ${\displaystyle \mathbf {i} =(1,0,0)}$.
• In ${\displaystyle \mathbb {R} ^{2}}$, ${\displaystyle \mathbf {i} =(1,0)}$.

We can see that ${\displaystyle \mathbf {i} }$ in ${\displaystyle \mathbb {R} ^{2}}$ is different from ${\displaystyle \mathbf {i} }$ in ${\displaystyle \mathbb {R} ^{3}}$.

However, in linear algebra, we sometimes need to distinguish row and column vectors, which are defined as follows:

Definition. (Row and column vector) A row vector is a ${\displaystyle 1\times n}$ matrix, and a column vector is a ${\displaystyle n\times 1}$ matrix.

Remark.

• It is more common to use column vectors.
• Because of this, we can apply the definitions of addition and scalar multiplication of a matrix to the corresponding vector operations.

Example. (Row and column vectors) ${\displaystyle {\begin{pmatrix}1&2&3\end{pmatrix}}}$ is a row vector, and ${\displaystyle {\begin{pmatrix}1\\2\\3\\\end{pmatrix}}}$ is a column vector.

Remark.

• To save space, we may use ${\displaystyle {\begin{pmatrix}v_{1}&\cdots &v_{n}\end{pmatrix}}^{T}}$ to represent column vectors.
• To save more space, it is more common to denote this transpose by ${\displaystyle (v_{1},\ldots ,v_{n})^{T}}$.
• On the other hand, we usually do not denote row vectors by ${\displaystyle (v_{1},\ldots ,v_{n})}$ to avoid confusion with the notation of vectors (without specifying row or column vectors).

The two basic vector operations are addition and scalar multiplication. Using these two operations only, we can combine multiple vectors as in the following definition.

Definition. (Linear combination) Let ${\displaystyle \mathbf {v} _{1},\ldots ,\mathbf {v} _{k}\in \mathbb {R} ^{n}}$. A vector ${\displaystyle \mathbf {v} \in \mathbb {R} ^{n}}$ is a linear combination of ${\displaystyle \mathbf {v} _{1},\ldots ,\mathbf {v} _{k}}$ if

${\displaystyle \mathbf {v} =c_{1}\mathbf {v} _{1}+\cdots +c_{k}\mathbf {v} _{k}}$
for some scalars (or real numbers) ${\displaystyle c_{1},\ldots ,c_{k}}$.

Example. The vector ${\displaystyle (3,4,5)^{T}}$ is a linear combination of ${\displaystyle (1,2,3)^{T}}$ and ${\displaystyle (2,3,4)^{T}}$, while the vector ${\displaystyle (3,4,6)^{T}}$ is not.

Proof. Since

${\displaystyle (3,4,5)^{T}=a(1,2,3)^{T}+b(2,3,4)^{T}\iff {\begin{cases}a+2b=3\\2a+3b=4\\3a+4b=5\\\end{cases}},}$
and we can transform the augmented matrix representing this SLE as follows:
${\displaystyle {\begin{pmatrix}1&2&3\\2&3&4\\3&4&5\\\end{pmatrix}}{\overset {-3\mathbf {r} _{1}+\mathbf {r} _{3}\to \mathbf {r} _{3}}{\overset {-2\mathbf {r} _{1}+\mathbf {r} _{2}\to \mathbf {r} _{2}}{\to }}}{\begin{pmatrix}1&2&3\\0&-1&-2\\0&-2&-4\\\end{pmatrix}}{\overset {-\mathbf {r} _{2}\to \mathbf {r} _{2}}{\to }}{\begin{pmatrix}1&2&3\\0&1&2\\0&-2&-4\\\end{pmatrix}}{\overset {-2\mathbf {r} _{2}+\mathbf {r} _{1}\to \mathbf {r} _{1}}{\overset {2\mathbf {r} _{2}+\mathbf {r} _{3}\to \mathbf {r} _{3}}{\to }}}{\begin{pmatrix}1&0&-1\\0&1&2\\0&0&0\\\end{pmatrix}}.}$
Then, we can directly read that the unique solution is ${\displaystyle (a,b)=(-1,2)}$. So, we can express ${\displaystyle (3,4,5)^{T}}$ as the linear combination of ${\displaystyle (1,2,3)^{T}}$ and ${\displaystyle (2,3,4)^{T}}$.

On the other hand, since

${\displaystyle (3,4,6)^{T}=a(1,2,3)^{T}+b(2,3,4)^{T}\iff {\begin{cases}a+2b=3\\2a+3b=4\\3a+4b=6\\\end{cases}},}$
and we can transform the augmented matrix representing this SLE as follows:
${\displaystyle {\begin{pmatrix}1&2&3\\2&3&4\\3&4&6\\\end{pmatrix}}{\overset {-3\mathbf {r} _{1}+\mathbf {r} _{3}\to \mathbf {r} _{3}}{\overset {-2\mathbf {r} _{1}+\mathbf {r} _{2}\to \mathbf {r} _{2}}{\to }}}{\begin{pmatrix}1&2&3\\0&-1&-2\\0&-2&-3\\\end{pmatrix}}{\overset {-\mathbf {r} _{2}\to \mathbf {r} _{2}}{\to }}{\begin{pmatrix}1&2&3\\0&1&2\\0&-2&-3\\\end{pmatrix}}{\overset {-2\mathbf {r} _{2}+\mathbf {r} _{1}\to \mathbf {r} _{1}}{\overset {2\mathbf {r} _{2}+\mathbf {r} _{3}\to \mathbf {r} _{3}}{\to }}}{\begin{pmatrix}1&0&-1\\0&1&2\\0&0&1\\\end{pmatrix}}.}$
Since there is a leading one at the 3rd column, the SLE is inconsistent, and therefore we cannot express ${\displaystyle (3,4,6)^{T}}$ as a linear combination of ${\displaystyle (1,2,3)^{T}}$ and ${\displaystyle (2,3,4)^{T}}$.

${\displaystyle \Box }$

Exercise.

1 Choose linear combination(s) of ${\displaystyle (1,2)^{T},(0,0)^{T}}$.

 ${\displaystyle (1,2)^{T}}$. ${\displaystyle (0,0)^{T}}$. ${\displaystyle (0,1)^{T}}$. ${\displaystyle (1,2)}$. ${\displaystyle (0,0)}$.

2 Select all correct statement(s).

 If a nonzero vector ${\displaystyle \mathbf {v} }$ is a linear combination of a vector ${\displaystyle \mathbf {v} _{1}}$, and also a linear combination of a vector ${\displaystyle \mathbf {v} _{2}}$, then ${\displaystyle \mathbf {v} _{1}}$ is a linear combination of ${\displaystyle \mathbf {v} _{2}}$. Linear combination of vectors ${\displaystyle \mathbf {v} _{1},\mathbf {v} _{2}}$ and linear combination of vectors ${\displaystyle \mathbf {v} _{2},\mathbf {v} _{3}}$ are both linear combination of vectors ${\displaystyle \mathbf {v} _{1},\mathbf {v} _{2},\mathbf {v} _{3}}$. Zero vector is a linear combination of arbitrary vector(s). There are infinitely many possible linear combinations for arbitrary vector(s). ${\displaystyle \mathbf {v} =\pi ^{2}\mathbf {v} _{1}+3\mathbf {v} _{2}}$ is not a linear combination of vectors ${\displaystyle \mathbf {v} _{1},\mathbf {v} _{2}}$.

Another concept that is closely related to linear combinations is span.

Definition. (Span)

Let ${\displaystyle S=\{\mathbf {v} _{1},\ldots ,\mathbf {v} _{k}\}}$ be a nonempty subset of ${\displaystyle \mathbb {R} ^{n}}$. The span of ${\displaystyle S}$, denoted by ${\displaystyle \operatorname {span} (S)}$, is the set of all linear combinations of ${\displaystyle \mathbf {v} _{1},\ldots ,\mathbf {v} _{k}}$.

Remark.

• It follows that ${\displaystyle \operatorname {span} (S)}$ contains infinitely many vectors, since there are infinitely many possible linear combinations of such vectors.
• It follows that we can use the vectors belonging in the set ${\displaystyle S}$ to generate each vector in ${\displaystyle \operatorname {span} (S)}$.
• We have a span of a set containing some vector(s), instead of a span of vectors.

Example. The span of the set ${\displaystyle \{(1,2,3)^{T},(2,3,4)^{T}\}}$ is

${\displaystyle \{(a+2b,2a+3b,3a+4b)^{T}:a,b\in \mathbb {R} \}}$
since linear combinations of ${\displaystyle (1,2,3)^{T}}$ and ${\displaystyle (2,3,4)^{T}}$ are in the form of
${\displaystyle a(1,2,3)^{T}+b(2,3,4)^{T}=(a+2b,2a+3b,3a+4b)^{T}.}$
Geometrically, the span is a plane in ${\displaystyle \mathbb {R} ^{3}}$.

The span of the set ${\displaystyle \{(1,1)^{T}\}}$ is

${\displaystyle \{(a,a)^{T}:a\in \mathbb {R} \}}$
since linear combinations of ${\displaystyle (1,1,1)^{T}}$ are in the form of
${\displaystyle a(1,1)^{T}=(a,a)^{T}.}$
Geometrically, the span is a line in ${\displaystyle \mathbb {R} ^{2}}$.

Exercise.

1 Select all correct expression(s) for ${\displaystyle \operatorname {span} {(\{\mathbf {0} \})}}$, in which ${\displaystyle \mathbf {0} \in \mathbb {R} ^{n}}$.

 ${\displaystyle \mathbf {0} }$. Empty set, ${\displaystyle \varnothing }$. ${\displaystyle \{\mathbf {0} \}}$. ${\displaystyle \{\{\mathbf {0} \}\}}$. ${\displaystyle \mathbb {R} ^{n}}$

2 Select all correct expression(s) for ${\displaystyle \operatorname {span} {(\{\mathbf {i} ,\mathbf {j} ,\mathbf {k} \})}}$, in which ${\displaystyle \mathbf {i} ,\mathbf {j} ,\mathbf {k} }$ are column vectors.

 ${\displaystyle \mathbb {R} ^{3}}$. ${\displaystyle \{\mathbf {i} ,\mathbf {j} ,\mathbf {k} \}}$. ${\displaystyle \{a\mathbf {i} ,b\mathbf {j} ,c\mathbf {k} :a,b,c\in \mathbb {R} \}}$. ${\displaystyle \{(a,b,c)^{T}:a,b,c\in \mathbb {R} \}}$.

3 Let ${\displaystyle S}$ and ${\displaystyle T}$ be sets containing some vectors, which are nonempty subset of ${\displaystyle \mathbb {R} ^{n}}$. Select all correct statement(s).

 ${\displaystyle \operatorname {span} {(S\cup T)}=\operatorname {span} (S)\cup \operatorname {span} (T)}$ If ${\displaystyle \operatorname {span} (S)=\operatorname {span} (T)}$, then ${\displaystyle S=T}$. If ${\displaystyle \operatorname {span} (S)\neq \operatorname {span} (T)}$, then ${\displaystyle S\neq T}$ ${\displaystyle \operatorname {span} {(\operatorname {span} (S))}=\operatorname {span} (S)}$ ${\displaystyle \operatorname {span} {(\{\mathbf {u} ,\mathbf {v} \})}=\mathbb {R} ^{2}}$ for each ${\displaystyle \mathbf {u} ,\mathbf {v} \in \mathbb {R} ^{2}}$

### Linear independence

Definition. (Linear (in)dependence)

Let ${\displaystyle S=\{\mathbf {v} _{1},\ldots ,\mathbf {v} _{k}\}}$ be a subset of ${\displaystyle \mathbb {R} ^{n}}$. The set ${\displaystyle S}$ is linearly dependent if there exist scalars ${\displaystyle c_{1},\ldots ,c_{k}}$ that are not all zero such that

${\displaystyle c_{1}\mathbf {v} _{1}+\cdots +c_{k}\mathbf {v} _{k}=\mathbf {0} .}$
Otherwise, the set is linearly independent.

Remark.

• (terminology) We may also say that the vectors ${\displaystyle \mathbf {v} _{1},\ldots ,\mathbf {v} _{k}}$ are linearly independent, instead of saying the set containing these vectors is linearly (in)dependent.
• If the vectors are linearly dependent, it is possible that some of ${\displaystyle c_{1},\ldots ,c_{k}}$, in the equation, are zero.
• Equivalently, if the vectors are linearly independent, then we have 'if ${\displaystyle c_{1}\mathbf {v} _{1}+\cdots +c_{k}\mathbf {v} _{k}=\mathbf {0} }$, then the only solution is ${\displaystyle c_{1}=\cdots =c_{k}=0}$'.
• This is a more common way to check linear independence.

Then, we will introduce an intuitive result about linear dependence, in the sense that the results match with the name 'linear dependence'.

Proposition. (Equivalent condition for linearly dependence) The vectors ${\displaystyle \mathbf {v} _{1},\cdots ,\mathbf {v} _{k}}$ are linearly dependent if and only if one of them is a linear combination of the others.

Proof.

• Only if part:
• without loss of generality, suppose ${\displaystyle c_{1}\mathbf {v} _{1}+\cdots +c_{k}\mathbf {v} _{k}}$ in which ${\displaystyle c_{1}\neq 0}$ (we can replace ${\displaystyle c_{1}}$ by another scalar, and the result still holds by symmetry).
• Then, ${\displaystyle \mathbf {v} _{1}=-{\frac {c_{2}}{c_{1}}}\mathbf {v} _{2}-\cdots -{\frac {c_{k}}{c_{1}}}\mathbf {v} _{k}}$, i.e. ${\displaystyle \mathbf {v} _{1}}$ is a linear combination of the others.
• If part:
• without loss of generality, suppose ${\displaystyle \mathbf {v} _{1}=b_{2}\mathbf {v} _{2}+\cdots +b_{k}\mathbf {v} _{k}}$ (we can similarly replace ${\displaystyle \mathbf {v} _{1}}$ by another vector, and the result still holds by symmetry).
• Then, ${\displaystyle \mathbf {v} _{1}-b_{2}\mathbf {v} _{2}-\cdots -b_{k}\mathbf {v} _{k}=\mathbf {0} }$.
• Since the coefficient of ${\displaystyle \mathbf {v} _{1}}$ is nonzero (it is one), ${\displaystyle \mathbf {v} _{1},\ldots ,\mathbf {v} _{k}}$ are linearly dependent.

${\displaystyle \Box }$

Remark.

• This does not mean that each of them is a linear combination of the others.
• If vectors are 'linearly dependent', we may intuitively think that they are related in a linear sense, and this is true, since one of them is a linear combination of the others, i.e. it has a relationship with all other vectors.

Example. The vectors ${\displaystyle (1,2,3)^{T},(2,3,4)^{T},(3,4,5)^{T}}$ is linearly dependent.

Proof.

• Consider the equation ${\displaystyle a(1,2,3)^{T}+b(2,3,4)^{T}+c(3,4,5)^{T}=(0,0,0)^{T}}$.
• Since the determinant of the coefficient matrix

${\displaystyle {\begin{vmatrix}1&2&3\\2&3&4\\3&4&5\\\end{vmatrix}}=1(3)(5)+2(4)(3)+3(2)(4)-3(3)(3)-2(2)(5)-4(4)(1)=0,}$

the coefficient matrix is non-invertible.
• Thus, the homogeneous SLE has a non-trivial solution by simplified invertible matrix theorem, i.e. there exist scalars that are not all zero satisfying the equation.

${\displaystyle \Box }$

Then, we will introduce a proposition for linearly independent vectors.

Proposition. (Comparing coefficients for linearly independent vectors) Let ${\displaystyle \mathbf {v} _{1},\ldots ,\mathbf {v} _{k}}$ be linearly independent vectors. If

${\displaystyle a_{1}\mathbf {v} _{1}+\cdots +a_{k}\mathbf {v} _{k}=b_{1}\mathbf {v} _{1}+\cdots +b_{k}\mathbf {v} _{k},}$
${\displaystyle (a_{1},\ldots ,a_{k})=(b_{1},\ldots ,b_{k})}$.

Proof.

${\displaystyle a_{1}\mathbf {v} _{1}+\cdots +a_{k}\mathbf {v} _{k}=b_{1}\mathbf {v} _{1}+\cdots +b_{k}\mathbf {v} _{k},\Leftrightarrow (a_{1}-b_{1})\mathbf {v} _{1}+\cdots +(a_{k}-b_{k})\mathbf {v} _{k}=\mathbf {0} }$
By the linear independence of vectors,
${\displaystyle a_{1}-b_{1}=\cdots =a_{k}-b_{k}=0,}$
and the result follows.

${\displaystyle \Box }$

Example. (Finding unknown coefficients by comparison) Suppose ${\displaystyle \mathbf {v} _{1},\mathbf {v} _{2},\mathbf {v} _{3}}$ are linearly independent vectors, and

${\displaystyle 2\mathbf {v} _{1}+a\mathbf {v} _{2}+\mathbf {v} _{3}=b\mathbf {v} _{1}+7\mathbf {v} _{2}+c\mathbf {v} _{3}.}$
Then, by comparing coefficients, we have
${\displaystyle (a,b,c)=(7,2,1).}$

Example. Consider three linearly dependent vectors ${\displaystyle (1,2,4)^{T},(2,4,8)^{T},(1,2,3)^{T}}$. Even if

${\displaystyle a_{1}(1,2,4)^{T}+a_{2}(2,4,8)^{T}+a_{3}(1,2,3)^{T}=b_{1}(1,2,4)^{T}+b_{2}(2,4,8)^{T}+b_{3}(1,2,3)^{T},}$
we may not have ${\displaystyle (a_{1},a_{2},a_{3})=(b_{1},b_{2},b_{3})}$. E.g., we have
${\displaystyle 4(1,2,4)^{T}+(2,4,8)^{T}+(1,2,3)^{T}=2(1,2,4)^{T}+2(2,4,8)^{T}+(1,2,3)^{T}.}$

Exercise. Let ${\displaystyle \mathbf {u} ,\mathbf {v} ,\mathbf {w} }$ be linearly independent vectors.

1 Select all correct statement(s).

 ${\displaystyle \mathbf {u} ,\mathbf {v} }$ are linearly independent. ${\displaystyle \mathbf {u} ,\mathbf {v} ,\mathbf {w} ,\mathbf {0} }$ are linearly independent. ${\displaystyle \mathbf {v} ,\mathbf {w} ,\mathbf {u} +\mathbf {v} }$ are linearly dependent ${\displaystyle a\mathbf {u} ,b\mathbf {v} ,c\mathbf {w} }$ are linearly independent for each scalar ${\displaystyle a,b,c}$

2 Select all correct statement(s).

 Single arbitrary vector is linearly independent. If ${\displaystyle \mathbf {u} ,\mathbf {v} }$ are linearly independent, and ${\displaystyle \mathbf {v} ,\mathbf {w} }$ are linearly independent, then ${\displaystyle \mathbf {u} ,\mathbf {v} ,\mathbf {w} }$ are linearly independent. ${\displaystyle a_{1}\mathbf {e} _{1}+\cdots +a_{k}\mathbf {e} _{k}=b_{1}\mathbf {e} _{1}+\cdots +b_{k}\mathbf {e} _{k}\Rightarrow (a_{1},\ldots ,a_{k})=(b_{1},\ldots ,b_{k})}$ ${\displaystyle \mathbf {e} _{1},\ldots ,\mathbf {e} _{k}}$ are linearly independent.

Then, we will discuss two results that relate linear independence with SLE.

Proposition. (Relationship between linear independence and invertibility) Let ${\displaystyle S=\{\mathbf {v} _{1},\ldots ,\mathbf {v} _{\color {green}n}\}}$ be a set of vectors in ${\displaystyle \mathbb {R} ^{\color {green}n}}$ (the number of vectors must be ${\displaystyle n}$, so that the following matrix is square). Let ${\displaystyle A}$ be the square matrix whose columns are ${\displaystyle \mathbf {v} _{1},\ldots ,\mathbf {v} _{n}}$ respectively. Then, ${\displaystyle S}$ is linearly independent if and only if ${\displaystyle A}$ is invertible.

Proof. Setting ${\displaystyle \mathbf {x} =(c_{1},\ldots ,c_{n})^{T}}$,

${\displaystyle c_{1}\mathbf {v} _{1}+\cdots +c_{n}\mathbf {v} _{n}=\mathbf {0} \iff A\mathbf {x} =\mathbf {0} ,}$
a homogeneous SLE. By definition of linear independence, ${\displaystyle S}$ is linearly independent is equivalent to ${\displaystyle A\mathbf {x} =\mathbf {0} }$ only has the trivial solution, which is also equivalent to ${\displaystyle A}$ is invertible, by the simplified invertible matrix theorem.

${\displaystyle \Box }$

Remark. This gives a convenient way to check linear (in)dependence if the number of vectors involved matches with the number of entries for each of them.

Example. The set ${\displaystyle \{(1,1,1)^{T},(2,3,4)^{T},(7,3,6)^{T}\}}$ is linearly independent, since

${\displaystyle {\begin{vmatrix}1&2&7\\1&3&3\\1&4&6\\\end{vmatrix}}=7\neq 0}$

Proposition. (Relationship between linear independence and number of solutions in SLE) Let ${\displaystyle A\mathbf {x} =\mathbf {b} }$ be a SLE (${\displaystyle A}$ may not be square matrix, and ${\displaystyle \mathbf {b} }$ can be nonzero). If the columns of ${\displaystyle A}$ are linearly independent, then the SLE has at most one solution.

Proof. Let ${\displaystyle \mathbf {a} _{1},\ldots ,\mathbf {a} _{n}}$ be the columns of ${\displaystyle A}$, and let ${\displaystyle \mathbf {x} =(x_{1},\ldots ,x_{n})^{T}}$.

Then, ${\displaystyle A\mathbf {x} =\mathbf {b} \iff x_{1}\mathbf {a} _{1}+\cdots +x_{n}\mathbf {a} _{n}=\mathbf {b} }$. Assume there are two distinct solutions ${\displaystyle (x_{1},\ldots ,x_{n})^{T}}$ and ${\displaystyle (y_{1},\ldots ,y_{n})^{T}}$ for the SLE, i.e.,

${\displaystyle x_{1}\mathbf {a} _{1}+\cdots +x_{n}\mathbf {a} _{n}=\mathbf {b} =y_{1}\mathbf {a} _{1}+\cdots +y_{n}\mathbf {a} _{n}.}$
But, by the proposition about comparing coefficients for linear independent vectors,
${\displaystyle (x_{1},\ldots ,x_{n})=(y_{1},\ldots ,y_{n}),}$
which contradicts with our assumption that these two solutions are distinct.

${\displaystyle \Box }$

Remark.

• A special case is that if the columns of ${\displaystyle A}$ are linearly independent, then ${\displaystyle A\mathbf {x} =\mathbf {0} }$ only has a trivial solution, so ${\displaystyle A}$ is invertible, which matches with the previous proposition.
• The SLE has at most one solution and is equivalent to the SLE having either no solutions or one unique solution.

Example. The set ${\displaystyle \{(1,1,1)^{T},(2,3,4)^{T}\}}$ is linearly independent, since none of them is a linear combination of the others. Thus, the SLE

${\displaystyle {\begin{cases}x+2y&=a\\x+3y&=b\\x+4y&=c\\\end{cases}}}$
has at most one solution for each ${\displaystyle a,b}$. E.g., the SLE
${\displaystyle {\begin{cases}x+2y&=4\\x+3y&=3\\x+4y&=2\\\end{cases}}}$
has no solutions, by considering the augmented matrix of this SLE
${\displaystyle {\begin{pmatrix}1&2&4\\1&3&3\\1&4&2\\\end{pmatrix}}.}$
Since ${\displaystyle {\begin{vmatrix}1&2&4\\1&3&3\\1&4&2\\\end{vmatrix}}=-4,}$ and the augmented matrix is invertible, and thus its RREF is ${\displaystyle I_{3}}$ by the simplified invertible matrix theorem. Then, since there is a leading one at the 3th column in ${\displaystyle I_{3}}$, the SLE is inconsistent.

Exercise. Let ${\displaystyle A={\begin{pmatrix}2&0&2&2\\2&5&8&9\\3&1&2&5\\1&2&3&4\\\end{pmatrix}},\mathbf {x} =(x_{1},x_{2},x_{3},x_{4})^{T},\mathbf {b} =(b_{1},b_{2},b_{3},b_{4})^{T}}$. It is given that ${\displaystyle \det A=-2}$.

Select all correct statement(s).

 The set ${\displaystyle \{(2,0,2,2)^{T},(2,5,8,9)^{T},(3,1,2,5)^{T},(1,2,3,4)^{T}\}}$ is linearly independent. The set ${\displaystyle \{(2,2,3,1)^{T},(0,5,1,2)^{T},(2,8,2,3)^{T},(2,9,5,4)^{T}\}}$ is linearly independent. The homogeneous SLE ${\displaystyle A\mathbf {x} =\mathbf {0} }$ only has the trivial solution. The SLE ${\displaystyle A\mathbf {x} =\mathbf {b} }$ may have infinitely many solutions

## Subspaces

Then, we will discuss subspaces. Simply speaking, they are some subsets of ${\displaystyle \mathbb {R} ^{n}}$ that have some nice properties. To be more precise, we have the following definition.

Definition. (Subspace) A subset ${\displaystyle V}$ of ${\displaystyle \mathbb {R} ^{n}}$ is a subspace of ${\displaystyle \mathbb {R} ^{n}}$ if all of the following conditions hold.

1. ${\displaystyle \mathbf {0} \in V}$
2. (closure under addition) for each ${\displaystyle \mathbf {u} ,\mathbf {v} \in V}$, ${\displaystyle \mathbf {u} +\mathbf {v} \in V}$
3. (closure under scalar multiplication) for each ${\displaystyle \mathbf {v} \in V}$ and scalar ${\displaystyle c}$, ${\displaystyle c\mathbf {v} \in V}$

Remark.

• ${\displaystyle V}$ stands for vector space, since it is a kind of vector space, that is a subset of some larger vector spaces.
• The definition of vector space involves more conditions and is more complicated, and thus not included here.
• For subspaces, after these conditions are satisfied, the remaining conditions for vector spaces are automatically satisfied.
• If ${\displaystyle V}$ is nonempty, then the first condition is redundant.
• But, we may not know whether ${\displaystyle V}$ is empty or nonempty, so it may be more convenient to simply check the first condition.
• This is because for each ${\displaystyle \mathbf {v} \in V}$, ${\displaystyle -\mathbf {v} =(-1)\cdot \mathbf {v} \in V}$ by closure under scalar multiplication, and thus ${\displaystyle \mathbf {0} =\mathbf {v} +(-\mathbf {v} )\in V}$ by closure under addition.

Example. (Zero space) The set containing only the zero vector, ${\displaystyle \{\mathbf {0} \}}$, is a subspace of ${\displaystyle \mathbb {R} ^{n}}$, and is called the zero space.

Proof.

• ${\displaystyle \mathbf {0} \in \{\mathbf {0} \}}$;
• ${\displaystyle \mathbf {0} +\mathbf {0} =\mathbf {0} \in \{\mathbf {0} \}}$;
• ${\displaystyle c\mathbf {0} =\mathbf {0} \in \{\mathbf {0} \}}$ for each scalar ${\displaystyle c}$.

${\displaystyle \Box }$

Example. The span of the set ${\displaystyle \{(1,2,3)^{T},(3,4,5)^{T}\}}$ is a subspace of ${\displaystyle \mathbb {R} ^{3}}$.

Proof. Let ${\displaystyle V=\operatorname {span} {(\{(1,2,3)^{T},(3,4,5)^{T}\})}}$.

• ${\displaystyle \mathbf {0} \in V}$ since ${\displaystyle \mathbf {0} =0\cdot (1,2,3)^{T}+0\cdot (3,4,5)^{T}}$, is a linear combination of ${\displaystyle (1,2,3)^{T}}$ and ${\displaystyle (3,4,5)^{T}}$;
• ${\displaystyle \mathbf {u} ,\mathbf {v} \in V\Rightarrow \mathbf {u} +\mathbf {v} \in V}$, since
• let ${\displaystyle \mathbf {u} =a(1,2,3)^{T}+b(3,4,5)^{T}}$ and ${\displaystyle \mathbf {v} =c(1,2,3)^{T}+d(3,4,5)^{T}}$, then ${\displaystyle \mathbf {u} +\mathbf {v} =(a+c)(1,2,3)^{T}+(b+d)(3,4,5)^{T}\in V}$.
• ${\displaystyle \mathbf {v} \in V,c\in \mathbb {R} \Rightarrow c\mathbf {v} \in V}$, since
• let ${\displaystyle \mathbf {v} =a(1,2,3)^{T}+b(3,4,5)^{T}}$, then ${\displaystyle c\mathbf {v} =ca(1,2,3)^{T}+cb(3,4,5)^{T}\in V}$.

${\displaystyle \Box }$

We can see from this example that the entries themselves do not really matter. Indeed, we have the following general result:

Proposition. (a span of finite set is a subspace) For each finite set ${\displaystyle S}$, ${\displaystyle \operatorname {span} (S)}$ is a subspace.

Proof. The idea of the proof is shown in the above example:

• ${\displaystyle \mathbf {0} \in V}$ since zero vector is a linear combination of the vectors belonging to ${\displaystyle S}$;
• ${\displaystyle \mathbf {u} ,\mathbf {v} \in V\Rightarrow \mathbf {u} +\mathbf {v} \in V}$ since ${\displaystyle \mathbf {u} +\mathbf {v} }$ is a linear combination of the vectors belonging to ${\displaystyle S}$;
• ${\displaystyle \mathbf {v} \in V,c\in \mathbb {R} \Rightarrow c\mathbf {v} \in V}$ since ${\displaystyle c\mathbf {v} }$ is a linear combination of the vectors belonging to ${\displaystyle S}$.

${\displaystyle \Box }$

Exercise.

Select all correct statement(s).

 Empty set, ${\displaystyle \varnothing }$, is a subspace. ${\displaystyle L=\{(1,0,0)^{T}+t(2,3,4)^{T}:t\in \mathbb {R} \}}$ is a subspace. ${\displaystyle \{(1,2,3)^{T}\}}$ is a subspace. ${\displaystyle \mathbb {R} ^{3}}$ is a subspace. ${\displaystyle S=\{(x,y):x\geq 0,y\leq 0\}}$ is a subspace.

In particular, we have special names for some of the spans, as follows:

Definition. (Row, column, and null space) Let ${\displaystyle A}$ be a matrix. The row (column) space of ${\displaystyle A}$ is the span of the rows (columns) of ${\displaystyle A}$, denoted by ${\displaystyle \operatorname {Row} (A)}$ (${\displaystyle \operatorname {Col} (A)}$). The null space (or kernel) of ${\displaystyle A}$ is the solution set to the homogeneous SLE ${\displaystyle A\mathbf {x} =\mathbf {0} }$, denoted by ${\displaystyle \operatorname {Null} (A)}$ (or ${\displaystyle \operatorname {ker} (A)}$ for the name 'kernel').

Remark.

• It follows from the proposition about the span of a finite set being a subspace, that row and column spaces are subspaces.
• Row and column spaces may belong to different Euclidean spaces,
• e.g. for a ${\displaystyle m\times n}$ matrix ${\displaystyle A}$, ${\displaystyle \operatorname {Row} (A)\in \mathbb {R} ^{m}}$, and ${\displaystyle \operatorname {Col} (A)\in \mathbb {R} ^{n}}$.

Example. Null space is a subspace.

Proof. Consider a homogeneous SLE ${\displaystyle A\mathbf {x} =\mathbf {0} }$. Let ${\displaystyle V}$ be the solution set to ${\displaystyle A\mathbf {x} =\mathbf {0} }$, i.e. ${\displaystyle V=\operatorname {Null} (A)}$.

• ${\displaystyle \mathbf {0} \in V}$ since ${\displaystyle A\mathbf {0} =\mathbf {0} }$;
• ${\displaystyle \mathbf {u} ,\mathbf {v} \in V\Rightarrow \mathbf {u} +\mathbf {v} \in V}$, because
• since ${\displaystyle \mathbf {u} ,\mathbf {v} \in V}$, ${\displaystyle A\mathbf {u} =\mathbf {0} ,A\mathbf {v} =\mathbf {0} }$;
• since ${\displaystyle A(\mathbf {u} +\mathbf {v} )=A\mathbf {u} +A\mathbf {v} =\mathbf {0} +\mathbf {0} =\mathbf {0} }$, ${\displaystyle \mathbf {u} +\mathbf {v} \in V}$.
• ${\displaystyle \mathbf {v} \in V,c\in \mathbb {R} \Rightarrow c\mathbf {v} \in V}$, because
• since ${\displaystyle \mathbf {v} \in V}$, ${\displaystyle A\mathbf {v} =\mathbf {0} }$;
• since ${\displaystyle A(c\mathbf {v} )=c(A\mathbf {v} )=c\mathbf {0} =\mathbf {0} }$, ${\displaystyle c\mathbf {v} \in V}$.

${\displaystyle \Box }$

Example. (Example of row, column and null spaces) Consider the matrix ${\displaystyle A={\begin{pmatrix}1&2&3\\3&4&5\\\end{pmatrix}}}$.

• ${\displaystyle \operatorname {Row} (A)=\operatorname {span} {(\{{\begin{pmatrix}1&2&3\end{pmatrix}},{\begin{pmatrix}3&4&5\end{pmatrix}}\})}}$;
• ${\displaystyle \operatorname {Col} (A)=\operatorname {span} {(\{(1,3)^{T},(2,4)^{T},(3,5)^{T}\})}}$;
• ${\displaystyle \operatorname {Null} (A)=\{(x,y,z)^{T}=(z,-2z,z)^{T}:z\in \mathbb {R} \}}$ (one possible expression)
• since the solution set of ${\displaystyle {\begin{pmatrix}1&2&3\\3&4&5\\\end{pmatrix}}{\begin{pmatrix}x\\y\\z\\\end{pmatrix}}={\begin{pmatrix}0\\0\\\end{pmatrix}}}$ is ${\displaystyle \{(x,y,z)^{T}=(z,-2z,z)^{T}:z\in \mathbb {R} \}}$.

Example. The set ${\displaystyle \{(x,y,z)^{T}:x+y+z=0\}}$ is a subspace of ${\displaystyle \mathbb {R} ^{3}}$.

Proof. ${\displaystyle x+y+z=0\iff {\begin{pmatrix}1&1&1\end{pmatrix}}{\begin{pmatrix}x\\y\\z\\\end{pmatrix}}=0}$, so the set is the null space of the ${\displaystyle 1\times 3}$ matrix, ${\displaystyle {\begin{pmatrix}1&1&1\end{pmatrix}}}$, which is a subspace.

${\displaystyle \Box }$

Geometrically, the set is a plane passing through the origin in ${\displaystyle \mathbb {R} ^{3}}$.

Exercise. Let ${\displaystyle A={\begin{pmatrix}1&3&2\\3&2&1\\2&1&3\\\end{pmatrix}}}$.

Select all correct statement(s).

 ${\displaystyle \operatorname {Row} (A)}$ is a subspace. ${\displaystyle \operatorname {Col} (A)}$ is a subspace. ${\displaystyle \operatorname {Row} (A)=\operatorname {Col} (A).}$ ${\displaystyle \operatorname {Null} {((A|\mathbf {0} ))}}$ is a subspace, in which ${\displaystyle (A|\mathbf {0} )}$ is an augmented matrix. ${\displaystyle \operatorname {Row} (A^{T})=\operatorname {Row} (A)}$

Then, we will introduce some more terminologies related to subspaces.

Definition. (Generating set) Let ${\displaystyle V}$ be a subspace and let ${\displaystyle S}$ be a subset of ${\displaystyle V}$. The set ${\displaystyle S}$ is a generating set (or spanning set) of ${\displaystyle V}$ if

${\displaystyle \operatorname {span} (S)=V.}$
We may also say that ${\displaystyle S}$ generates (or spans) ${\displaystyle V}$ in this case.

Definition. (Basis) Let ${\displaystyle V}$ be a subspace. A basis (plural: bases) for ${\displaystyle V}$ is a linearly independent generating set of ${\displaystyle V}$.

Remark.

• Basis is quite important, since it tells us the whole structure of ${\displaystyle V}$, with minimal number of vectors (a generating set of ${\displaystyle V}$ can tell us the whole structure of ${\displaystyle V}$).
• The linear independence ensures that there are no 'redundant' vectors in the generating set ('redundant' vectors are the vectors that are linear combinations of the others).
• Given a linearly dependent generating set, we may remove some of the vectors to make it linearly independent (this is known as the reduction theorem, we will discuss this later).
• We usually use ${\displaystyle \beta }$ to denote basis, since the initial syllable of 'beta' and 'basis' is similar.

The following theorem highlights the importance of basis.

Theorem. Let ${\displaystyle V}$ be a subspace of ${\displaystyle \mathbb {R} ^{n}}$ and let ${\displaystyle \beta }$ be a subset of ${\displaystyle V}$. Then, ${\displaystyle \beta }$ is a basis for ${\displaystyle V}$ if and only if each vector in ${\displaystyle V}$ can be represented as a linear combination of vectors in ${\displaystyle \beta }$ in a unique way.

Proof.

• Only if part:
• ${\displaystyle \beta }$ is a generating set, so each vector in ${\displaystyle V}$ belongs to ${\displaystyle \operatorname {span} {\beta }}$, i.e. each vector in ${\displaystyle V}$ is a linear combination of vectors in ${\displaystyle \beta }$.
• Uniqueness follows from the proposition about comparing coefficients for linear independent vectors.
• If part:
• ${\displaystyle \beta }$ generates ${\displaystyle V}$ because:
1. by definition of subspace, ${\displaystyle \operatorname {span} {\beta }\subseteq V}$ (since linear combinations of vectors in ${\displaystyle \beta }$ (the vectors in ${\displaystyle \beta }$ are also in ${\displaystyle V}$, by ${\displaystyle \beta \subseteq V}$) are belonging to ${\displaystyle V}$);
2. on the other hand, since each vector in ${\displaystyle V}$ can represented as a linear combination of vectors in ${\displaystyle \beta }$, we have ${\displaystyle V\subseteq \operatorname {span} {\beta }}$.
3. Thus, we have ${\displaystyle \operatorname {span} {\beta }=V}$, so ${\displaystyle \beta }$ generates ${\displaystyle V}$ by definition.
• ${\displaystyle \beta }$ is linearly independent because
• let ${\displaystyle \mathbf {v} _{1},\ldots ,\mathbf {v} _{n}}$ be the vectors in ${\displaystyle \beta }$ and
• assume ${\displaystyle a_{1}\mathbf {v} _{1}+\cdots +a_{n}\mathbf {v} _{n}=\mathbf {0} }$ in which ${\displaystyle a_{1},\ldots ,a_{n}}$ are not all zero, (i.e. ${\displaystyle \mathbf {v} _{1},\ldots ,\mathbf {v} _{n}}$ are linearly dependent) then we can express the zero vector in ${\displaystyle V}$ in two different ways:

${\displaystyle a_{1}\mathbf {v} _{1}+\cdots +a_{n}\mathbf {v} _{n},{\text{ and }}0\mathbf {v} _{1}+\cdots +0\mathbf {v} _{n},}$

which contradicts the uniqueness of representation.

${\displaystyle \Box }$

Example. (Standard basis) A basis for ${\displaystyle \mathbb {R} ^{n}}$ is ${\displaystyle \{\mathbf {e} _{1},\ldots ,\mathbf {e} _{n}\}}$, which is called the standard basis.

Proof. Let ${\displaystyle S=\{\mathbf {e} _{1},\ldots ,\mathbf {e} _{n}\}}$.

• ${\displaystyle S}$ generates ${\displaystyle \mathbb {R} ^{n}}$ since

${\displaystyle \mathbb {R} ^{n}=\{(v_{1},\ldots ,v_{n})^{T}:v_{1},\ldots ,v_{n}\in \mathbb {R} \}=\{v_{1}\mathbf {e} _{1}+\cdots +v_{n}\mathbf {e} _{n}:v_{1},\ldots ,v_{n}\in \mathbb {R} \}=\operatorname {span} (S).}$

• ${\displaystyle S}$ is linearly independent since

${\displaystyle v_{1}\mathbf {e} _{1}+\cdots +v_{n}\mathbf {e} _{n}=\mathbf {0} \implies (v_{1},\ldots ,v_{n})^{T}=(0,\ldots ,0)^{T}\implies v_{1}=\cdots =v_{n}=0.}$

${\displaystyle \Box }$

Example. A basis for the set ${\displaystyle S=\{(x,y,z)^{T}:x+y+z=0\}}$ is ${\displaystyle \{(-1,1,0)^{T},(-1,0,1)^{T}\}}$.

Proof. The general solution to ${\displaystyle x+y+z=0}$ is

${\displaystyle (x,y,z)^{T}=(-s-t,s,t)^{T}=s(-1,1,0)^{T}+t(-1,0,1)^{T}}$
by setting ${\displaystyle y=s,z=t}$ be independent unknowns. Since the general solution is linear combination of ${\displaystyle (-1,1,0)^{T}}$ and ${\displaystyle (-1,0,1)^{T}}$, ${\displaystyle \beta =\{(-1,1,0)^{T},(-1,0,1)^{T}\}}$ generates ${\displaystyle S}$. Also, ${\displaystyle \beta }$ is linearly independent, since
${\displaystyle a(-1,1,0)^{T}+b(-1,0,1)^{T}=(0,0,0)^{T}\implies (-a-b,a,b)^{T}=(0,0,0)^{T}\implies a=b=0.}$

${\displaystyle \Box }$

There are infinitely many other bases, since we can multiply a vector in this basis by arbitrary nonzero scalar.

Exercise.

Select all correct statement(s).

 ${\displaystyle \mathbf {i} ,\mathbf {j} }$ generate ${\displaystyle \mathbb {R} ^{2}}$. ${\displaystyle \{\mathbf {i} ,\mathbf {j} \}}$ generates ${\displaystyle \{\mathbf {i} +\mathbf {j} \}}$ The generating set of a subspace is unique. The basis of a subspace is unique. The basis for column space is a set containing some column vectors. Let ${\displaystyle S}$ be a generating set of subspace ${\displaystyle V}$. Then, ${\displaystyle V}$ also generates ${\displaystyle S}$.

Then, we will discuss some ways to construct a basis.

Theorem. (Extension and reduction theorem) Let ${\displaystyle V}$ be a subspace of ${\displaystyle \mathbb {R} ^{n}}$. Then, the following hold.

• (Extension theorem) Every linearly independent subset of ${\displaystyle V}$ can be extended to a basis for ${\displaystyle V}$;
• (Reduction theorem) every finite generating set of ${\displaystyle V}$ consists of a basis for ${\displaystyle V}$.

Remark. By convention, a basis for the zero space ${\displaystyle \{\mathbf {0} \}}$ is the empty set ${\displaystyle \varnothing }$.

Its proof is complicated.

Corollary. (Existence of basis for subspace of ${\displaystyle \mathbb {R} ^{n}}$) Each subspace of ${\displaystyle \mathbb {R} ^{n}}$ has a basis.

Proof. We start with an empty set ${\displaystyle \varnothing }$. It is linearly independent (since it is not linearly dependent by definition), and is a subset of every set. By extension theorem, it can be extended to a basis for subspace of ${\displaystyle \mathbb {R} ^{n}}$. Thus, each subspace of ${\displaystyle \mathbb {R} ^{n}}$ has a basis, found by this method.

${\displaystyle \Box }$

Example. (Using reduction theorem to find basis) A basis for the subspace ${\displaystyle V=\{(x+2y+3z,2x+3y+4z,5x+8y+11z)^{T}:x,y,z\in \mathbb {R} \}}$ is ${\displaystyle \{(1,2,3)^{T},(2,3,4)^{T}\}}$.

Proof. Observe that a generating set of ${\displaystyle V}$ is ${\displaystyle S_{1}=\{(1,2,3)^{T},(2,3,4)^{T},(5,8,11)^{T}\}}$, since

${\displaystyle (x+2y+3z,2x+3y+4z,5x+8y+11z)^{T}=x(1,2,3)^{T}+y(2,3,4)^{T}+z(5,8,11)^{T}.}$
By reduction theorem, ${\displaystyle S_{1}}$ must contain a basis. Observe that ${\displaystyle (5,8,11)^{T}=(1,2,3)^{T}+2(2,3,4)^{T}}$ (if this is not observed, we may use the equation in the definition of linear (in)dependence to find this). Thus, vectors in ${\displaystyle V=\operatorname {span} {S_{1}}}$ can also be generated by ${\displaystyle S_{2}=\{(1,2,3)^{T},(2,3,4)^{T}\}}$. Therefore, ${\displaystyle S_{2}}$ is a smaller generating set. Since
${\displaystyle c_{1}(1,2,3)^{T}+c_{2}(2,3,4)^{T}=(0,0,0)^{T}\implies (c_{1}+2c_{2},2c_{1}+3c_{2},3c_{1}+4c_{2})=(0,0,0)^{T},}$
and the RREF of the augmented matrix representing this SLE is
${\displaystyle {\begin{pmatrix}1&0&0\\0&1&0\\0&0&0\\\end{pmatrix}},}$
the only solution to this SLE is ${\displaystyle c_{1}=c_{2}=0}$, i.e. ${\displaystyle S_{2}}$ is linearly independent. It follows that ${\displaystyle S_{2}}$ is a basis.

${\displaystyle \Box }$

Exercise.

It is given that ${\displaystyle S=\{(2,0,0)^{T},(0,3,0)^{T}\}}$ is a linearly independent subset of subspace ${\displaystyle \mathbb {R} ^{3}}$. After adding a vector ${\displaystyle \mathbf {v} }$ into ${\displaystyle S}$, ${\displaystyle S}$ becomes a basis for ${\displaystyle \mathbb {R} ^{3}}$. Which of the following is (are) possible choice(s) of ${\displaystyle \mathbf {v} }$?

 ${\displaystyle (0,0,1)^{T}}$ ${\displaystyle (0,0,2)^{T}}$ ${\displaystyle (1,0,0)^{T}}$ ${\displaystyle (1,2,0)^{T}}$

A terminology that is related to basis is dimension.

Definition. (Dimension) Let ${\displaystyle \beta }$ be a basis for a subspace ${\displaystyle V}$ of ${\displaystyle \mathbb {R} ^{n}}$. The number of vectors in ${\displaystyle \beta }$, denoted by ${\displaystyle \operatorname {dim} (V)}$, is the dimension of ${\displaystyle V}$.

Remark.

• By convention, the dimension of the zero space ${\displaystyle \{\mathbf {0} \}}$ is ${\displaystyle 0}$.
• That is, we say that the number of vectors in empty set ${\displaystyle \varnothing }$ is ${\displaystyle 0}$.
• When the subspace has a higher dimension, there is more 'flexibility', since there are more parameters that are changeable.

Recall that there are infinitely many bases for a subspace. Luckily, all bases have the same number of vectors, and so the dimension of subspace is unique, as one will expect intuitively. This is assured bFy the following theorem.

Theorem. (Uniqueness of dimension) Dimension of arbitrary subspace is unique, i.e., if we let ${\displaystyle \beta _{1}}$ and ${\displaystyle \beta _{2}}$ be two finite bases for a subspace ${\displaystyle V}$ of ${\displaystyle \mathbb {R} ^{n}}$, then, the number of vectors in ${\displaystyle \beta _{1}}$ equals that of ${\displaystyle \beta _{2}}$.

Proof. Let ${\displaystyle \beta _{1}=\{\mathbf {u} _{1},\ldots ,\mathbf {u} _{k}\}}$ and ${\displaystyle \beta _{2}=\{\mathbf {w} _{1},\ldots ,\mathbf {w} _{\ell }\}}$. Also, let ${\displaystyle U_{n\times k}}$ and ${\displaystyle W_{n\times \ell }}$ be the matrices with ${\displaystyle \mathbf {u} _{i}}$'s and ${\displaystyle \mathbf {w} _{j}}$'s as columns.

By definition of basis, ${\displaystyle \operatorname {span} {\beta _{1}}=V}$, and ${\displaystyle \operatorname {span} {\beta _{2}}=V}$, so

${\displaystyle \mathbf {w} _{1}+0\mathbf {w} _{2}+\cdots +0\mathbf {w} _{k}=a_{11}\mathbf {u} _{1}+a_{21}\mathbf {u} _{2}+\cdots +a_{k1}\mathbf {u} _{k}\implies \mathbf {w} _{1}=U\mathbf {a} _{1}}$
for some ${\displaystyle \mathbf {a} _{1}=(a_{11},\ldots ,a_{k1})^{T}}$. By symmetry, ${\displaystyle \mathbf {w} _{2}=U\mathbf {a} _{2},\ldots ,\mathbf {w} _{\ell }=U\mathbf {a} _{\ell }}$. Thus, ${\displaystyle W=UA}$ in which ${\displaystyle A}$ is the matrix whose columns are ${\displaystyle \mathbf {a} _{1},\ldots ,\mathbf {a} _{\ell }}$, of size ${\displaystyle k\times \ell }$.

We claim that ${\displaystyle A\mathbf {x} =\mathbf {0} }$ only has the trivial solution, and this is true, since:

• If ${\displaystyle A\mathbf {x} =\mathbf {0} }$, then ${\displaystyle W\mathbf {x} =UA\mathbf {x} =U\mathbf {0} =\mathbf {0} }$, and thus ${\displaystyle \mathbf {x} =0}$, since the columns of ${\displaystyle W}$ are linearly independent, by the proposition about the relationship between linear independence and number of solutions in SLE.

Thus, the RREF of ${\displaystyle (A|\mathbf {0} )}$ (with ${\displaystyle \ell +1}$ columns) has a leading one in each of the first ${\displaystyle \ell }$ columns. Since there are ${\displaystyle k}$ rows in ${\displaystyle (A|\mathbf {0} )}$, we have ${\displaystyle k\geq \ell }$ (if ${\displaystyle k<\ell }$ , we cannot have ${\displaystyle \ell }$ leading ones, since there are at most ${\displaystyle k<\ell }$ leading ones)

By symmetry (swapping the role of ${\displaystyle \beta _{1}}$ and ${\displaystyle \beta _{2}}$), ${\displaystyle k\leq \ell }$, and thus ${\displaystyle k=\ell }$

${\displaystyle \Box }$

Example. (Dimension of Euclidean space) The dimension of ${\displaystyle \mathbb {R} ^{n}}$ is ${\displaystyle n}$, since a basis for ${\displaystyle \mathbb {R} ^{n}}$ is standard basis ${\displaystyle \{\mathbf {e} _{1},\ldots ,\mathbf {e} _{n}\}}$, which contains ${\displaystyle n}$ vectors.

Example. (Dimension of plane) The dimension of the subspace ${\displaystyle \{(x,y,z)^{T}:x+y+z=0\}}$ is ${\displaystyle 2}$, since a basis for this subspace is ${\displaystyle \{(-1,1,0)^{T},(-1,0,1)^{T}\}}$ (from a previous example), which contains ${\displaystyle 2}$ vectors. Geometrically, the subspace is a plane. In general, the dimension of each plane is ${\displaystyle 2}$.

Exercise.

Select all correct statement(s).

 The number of vectors in each finite generating set of subspace ${\displaystyle V}$ is greater than or equal to the dimension of ${\displaystyle V}$. The dimension of row space of a matrix is its number of rows. The dimension of column space of a matrix is its number of columns.

Then, we will discuss the bases of row, column and null spaces, and also their dimensions.

Proposition. (Basis for row space) Let ${\displaystyle A}$ be a matrix and ${\displaystyle R}$ be the RREF of ${\displaystyle A}$. Then, a basis for ${\displaystyle \operatorname {Row} (A)}$ is the set of all nonzero rows of ${\displaystyle R}$.

Proof. It can be proved that the row space is unchanged when an ERO is performed. E.g.,

• (type I ERO) ${\displaystyle \operatorname {span} {(\{\mathbf {r} _{1},\mathbf {r} _{2},\mathbf {r} _{3}\})}=\operatorname {span} {(\{\mathbf {r} _{2},\mathbf {r} _{1},\mathbf {r} _{3}\})}}$;
• (type II ERO) ${\displaystyle \operatorname {span} {(\{\mathbf {r} _{1},\mathbf {r} _{2},\mathbf {r} _{3}\})}=\operatorname {span} {(\{k\mathbf {r} _{1},\mathbf {r} _{2},\mathbf {r} _{3}\})}}$;
• (type III ERO) ${\displaystyle \operatorname {span} {(\{\mathbf {r} _{1},\mathbf {r} _{2},\mathbf {r} _{3}\})}=\operatorname {span} {(\{\mathbf {r} _{1}+k\mathbf {r} _{2},\mathbf {r} _{2},\mathbf {r} _{3}\})}}$.

Assuming this is true, we have ${\displaystyle \operatorname {Row} (A)=\operatorname {Row} (R)}$. It can be proved that the nonzero rows of ${\displaystyle R}$ generate ${\displaystyle \operatorname {Row} (R)}$, and they are linearly independent, so the nonzero rows form a basis for ${\displaystyle \operatorname {Row} (R)=\operatorname {Row} (A)}$.

${\displaystyle \Box }$

Remark. Another basis for ${\displaystyle \operatorname {Row} (A)}$ is the set of all rows of ${\displaystyle A}$ corresponding to the nonzero rows of ${\displaystyle R}$, i.e. the set of the rows that are originally located at the position of the nonzero rows of ${\displaystyle R}$, since it also generates the row space, and is also linear independent.

Example. Let ${\displaystyle A={\begin{pmatrix}1&3&4\\2&5&3\\6&15&9\\\end{pmatrix}}}$. It can be proved that its RREF is ${\displaystyle {\begin{pmatrix}1&0&-11\\0&1&5\\0&0&0\\\end{pmatrix}}}$, and therefore a basis for ${\displaystyle \operatorname {Row} (A)}$ is ${\displaystyle \beta =\{{\begin{pmatrix}1&0&-11\end{pmatrix}},{\begin{pmatrix}0&1&5\end{pmatrix}}\}}$ (it can be proved that ${\displaystyle \beta }$ is linearly independent), and its dimension is thus ${\displaystyle 2}$.

Another basis is ${\displaystyle \{{\begin{pmatrix}1&3&4\end{pmatrix}},{\begin{pmatrix}2&5&3\end{pmatrix}}\}}$, the corresponding rows to the nonzero rows of the RREF.

Proposition. (Basis for column space) Let ${\displaystyle A}$ be a matrix with columns ${\displaystyle \mathbf {a} _{1},\ldots ,\mathbf {a} _{n}}$, and let ${\displaystyle R}$ be RREF of ${\displaystyle A}$. Suppose columns ${\displaystyle i_{1},\ldots ,i_{k}}$ are the only columns of ${\displaystyle R}$ containing leading ones (they are indexes of column containing leading one). Then, a basis for ${\displaystyle \operatorname {Col} (A)}$ is ${\displaystyle \{\mathbf {a} _{i_{1}},\ldots ,\mathbf {a} _{i_{k}}\}}$.

Proof. Using Gauss-Jordan algorithm, ${\displaystyle (A|\mathbf {0} )}$ can be transformed to ${\displaystyle (R|\mathbf {0} )}$ via EROs, and they are row equivalent. Thus, ${\displaystyle A\mathbf {x} =\mathbf {0} }$ and ${\displaystyle R\mathbf {x} =\mathbf {0} }$ have the same solution set. Then, it can be proved that linearly (in)dependent columns of ${\displaystyle A}$ correspond to linearly (in)dependent columns of ${\displaystyle R}$. It follows that ${\displaystyle \{\mathbf {a} _{i_{1}},\ldots ,\mathbf {a} _{i_{k}}\}}$ is linearly independent, and all other columns belong to the span of this set.

${\displaystyle \Box }$

Example. Let ${\displaystyle A={\begin{pmatrix}1&3&4\\2&5&3\\6&15&9\\\end{pmatrix}}}$. From previous example, the RREF of ${\displaystyle A}$ is ${\displaystyle {\begin{pmatrix}{\color {green}1}&0&-11\\0&{\color {green}1}&5\\0&0&0\\\end{pmatrix}}}$. So, the columns of ${\displaystyle A}$ corresponding to the columns of ${\displaystyle R}$ containing leading ones, namely 1st and 2nd columns, form a basis. Thus, a basis for ${\displaystyle \operatorname {Col} (A)}$ is ${\displaystyle \{(1,2,6)^{T},(4,5,15)^{T}\}}$.

If we let ${\displaystyle \mathbf {a} _{1},\mathbf {a} _{2},\mathbf {a} _{3}}$ be the 1st, 2nd, 3rd columns of ${\displaystyle A}$, then ${\displaystyle \mathbf {a} _{3}=-11\mathbf {a} _{1}+5\mathbf {a} _{2}}$. If we let the notations be the corresponding columns of ${\displaystyle R}$ instead, the same equation also holds.

Example. (Basis for null space) Let ${\displaystyle A={\begin{pmatrix}1&3&4\\2&5&3\\6&15&9\\\end{pmatrix}}}$. From previous example, the RREF of ${\displaystyle A}$ is ${\displaystyle {\begin{pmatrix}{\color {green}1}&0&-11\\0&{\color {green}1}&5\\0&0&0\\\end{pmatrix}}}$. A basis for ${\displaystyle \operatorname {Null} (A)}$ is ${\displaystyle \{(11,-5,1)^{T}\}}$, since the solution set of ${\displaystyle A\mathbf {x} =\mathbf {0} }$ is ${\displaystyle \{\mathbf {x} =(11t,-5t,t):t\in \mathbb {R} \}}$, and its dimension is ${\displaystyle 1}$.

Exercise.

Let ${\displaystyle A}$ be a matrix, and ${\displaystyle R}$ be its RREF. Select all correct statement(s).

 A basis for ${\displaystyle \operatorname {Col} (A)}$ is the set of all columns of ${\displaystyle R}$ containing leading ones. Each basis for ${\displaystyle \operatorname {Col} (I_{3})}$ and ${\displaystyle \operatorname {Row} (I_{3})}$ contains the same number of vectors. Dimension of ${\displaystyle \operatorname {Row} (A)}$ is the number of leading ones in ${\displaystyle R}$ The dimension of the basis for ${\displaystyle \operatorname {Row} (A)}$ is smaller than or equal to the number of rows of ${\displaystyle A}$. The dimension of the basis for ${\displaystyle \operatorname {Col} (A)}$ is smaller than or equal to the number of columns of ${\displaystyle A}$.

Proposition. (Dimension of null space) Let ${\displaystyle A}$ be a matrix. The dimension of ${\displaystyle \operatorname {Null} (A)}$ is the number of independent unknowns in the solution set of ${\displaystyle A\mathbf {x} =\mathbf {0} }$.

Proof. The idea of the proof is illustrated in the above example: if there are ${\displaystyle k}$ independent unknowns in the solution set, we need a set consisting at least ${\displaystyle k}$ vectors to generate the solution set.

${\displaystyle \Box }$

We have special names for the dimensions of row, column and null spaces, as follows:

Definition. (Row rank, column rank and nullity) Let ${\displaystyle A}$ be a matrix. The dimensions of ${\displaystyle \operatorname {Row} (A),\operatorname {Col} (A)}$ and ${\displaystyle \operatorname {Null} (A)}$ are called the row rank, column rank, and nullity of ${\displaystyle A}$. They are denoted by ${\displaystyle \operatorname {row\;rank} (A),\operatorname {column\;rank} (A)}$ and ${\displaystyle \operatorname {nullity} (A)}$ respectively.

Indeed, the row rank and the column rank of each matrix are the same.

Proposition. (Row and column rank both equal number of leading ones of RREF) For each matrix ${\displaystyle A}$, ${\displaystyle \operatorname {row\;rank} (A)=\operatorname {column\;rank} (A)}$ is the number of leading ones of the RREF of ${\displaystyle A}$.

Proof. We can see this from the bases found by the proposition about basis for row space (number of nonzero rows is the number of leading ones of the RREF of ${\displaystyle A}$) and the proposition about basis for column space (there are ${\displaystyle k}$ column vectors, and ${\displaystyle k}$ is the number of leading ones by the assumption).

${\displaystyle \Box }$

Because of this proposition, we have the following definition.

Definition. (Rank) Let ${\displaystyle A}$ be a matrix. The rank of ${\displaystyle A}$, denoted by ${\displaystyle \operatorname {rank} (A)}$, is the common value of the row rank and the column rank of ${\displaystyle A}$.

Remark. We usually use this terminology and notation, instead of those for row rank and column rank.

Then, we will introduce an important theorem that relates rank and nullity.

Theorem. (Rank-nullity theorem) Let ${\displaystyle A}$ be an ${\displaystyle m\times {\color {green}n}}$ matrix. Then,

${\displaystyle \operatorname {rank} (A)+\operatorname {nullity} (A)={\color {green}n}}$

Proof. Let ${\displaystyle R}$ be the RREF of ${\displaystyle A}$. ${\displaystyle \operatorname {rank} (A)}$ is the number of leading ones of ${\displaystyle R}$, and ${\displaystyle \operatorname {nullity} (A)}$ is the number of independent unknowns of ${\displaystyle R\mathbf {x} =\mathbf {0} }$, which is ${\displaystyle {\color {green}n}}$ minus the number of leading ones of ${\displaystyle R}$. The result follows.

${\displaystyle \Box }$

Example. Let ${\displaystyle A={\begin{pmatrix}1&3&4\\2&5&3\\6&15&9\\\end{pmatrix}}}$. From previous examples,

• A basis for ${\displaystyle \operatorname {Row} (A)}$ is ${\displaystyle \{{\begin{pmatrix}1&0&-11\end{pmatrix}},{\begin{pmatrix}0&1&5\end{pmatrix}}\}}$;
• a basis for ${\displaystyle \operatorname {Col} (A)}$ is ${\displaystyle \{(1,2,6)^{T},(4,5,15)^{T}\}}$;
• a basis for ${\displaystyle \operatorname {Null} (A)}$ is ${\displaystyle \{(11,-5,1)^{T}\}}$.

Thus, ${\displaystyle \operatorname {rank} (A)=2}$ and ${\displaystyle \operatorname {nullity} (A)=1}$. Since the number of columns of ${\displaystyle A}$ is ${\displaystyle 3}$, this verifies the rank-nullity theorem.

Exercise.

Select all correct statement(s).

 ${\displaystyle \operatorname {rank} (O)=0}$ ${\displaystyle \operatorname {rank} (I)=1}$ ${\displaystyle \operatorname {nullity} (O)=0}$ ${\displaystyle \operatorname {nullity} (I)=1}$ ${\displaystyle A}$ is invertible if and only if ${\displaystyle \operatorname {rank} (A)}$ is the number of columns of ${\displaystyle A}$.