$\newcommand{R}{\mathbb{R}} \newcommand{defarrow}{\quad \stackrel{\text{def}}{\Longleftrightarrow} \quad}$

# Linear dependence

Let $X$ be a vector space, and $S \subset X$ any subset of $X$.

## Span

A linear combination of vectors $u_1, \ldots, u_n$ is a finite sum $\sum_{j=1}^n a_j u_j,$ where $a_1, \ldots, a_n$ are scalars. The (linear) span of $S \subset X$ is the set of all linear combinations of vectors in $S$: $\mathrm {span}(S) \stackrel{\text{def.}}{=} \big\{ \sum_\text{finite} a_j x_j \colon x_j \in S, a_j \text{ scalars}\big\}.$ For convenience, we define $\mathrm{span}(\emptyset) \stackrel{\text{def.}}{=} \{\mathbf 0\}$. If $V = \mathrm{span} (S)$ we say that $S$ generates $V$.

### › The linear span of a set S is the smallest subspace containing S

For any $S \subset X$, $\mathrm{span}(S)$ is a subspace of $X$, and $\mathrm{span}(S) = \bigcap_{S \subset V} \{ V \colon V \text{ is a subspace of } X\}.$

Ex.
• Let $x = (1,0)$, $y = (2,0)$ and $z = (1,1)$ be vectors in $\R^2$. Then $\mathrm{span}\{x\} = \mathrm{span}\{y\} = \mathrm{span}\{x,y\} = \{(\lambda,0) \colon \lambda \in \R\},$ $\mathrm{span} \{z\} = \{ (\lambda,\lambda) \colon \lambda \in \R\},$ $\mathrm{span}\{x,z\} = \mathrm{span}\{y,z\} = \mathrm{span}\{x,y,z\} = \R^2.$
• The vectors $e_1 = (1,0, \ldots)$, $e_2 = (0,1,0, \ldots)$, $\ldots$, $e_n = (0,\ldots,0,1)$ generate $\R^n$.
• In general, the span of a set differs between real and complex vector spaces: $\mathrm{span}_{\R}\{1\} = \R \quad\text{ but }\quad \mathrm{span}_{\mathbb C}\{1\} = \mathbb C.$

## Linear dependence

A family of vectors $u_1, u_2, \ldots$ is called linearly dependent if one of them is linear combination of some of the others: $\{ u_1, u_2, \ldots \} \text{ linearly dependent} \defarrow \sum_{j=1}^n a_j u_j = \mathbf 0 \quad\text{ for some } n \in \mathbb N \:\text{ and at least one }\: a_j \neq 0.$ Else, the family is linearly independent: $\{ u_1, u_2, \ldots \} \text{ linearly independent} \defarrow \big[ \text{for any } n \in \mathbb N: \quad \sum_{j=1}^n a_j u_j = \mathbf 0 \: \Longrightarrow\: a_j = 0 \:\forall\: j\big].$ More generally, a set $S$ is linearly independent if all finite subsets of it are linearly independent.

Ex.
• The vectors $x= (1,0)$, $y= (2,0)$ and $z=(1,1)$ are linearly dependent in $\R^2$, since $\begin{bmatrix}2\\0\end{bmatrix} = 2\begin{bmatrix}1\\0\end{bmatrix}.$ But both the sets $\{x,z\}$ and $\{y,z\}$ are linearly independent, since $a_1 x + a_2 z = \mathbf 0 \quad\Longleftrightarrow\quad a_1 \begin{bmatrix}1\\0\end{bmatrix} + a_2 \begin{bmatrix}1\\1\end{bmatrix} = \begin{bmatrix}0\\0\end{bmatrix} \quad\Longleftrightarrow\quad \begin{bmatrix}a_1 + a_2\\a_2\end{bmatrix} = \begin{bmatrix}0\\0\end{bmatrix} \quad\Longleftrightarrow\quad a_1 = a_2 = 0,$ and similarly for $\{y,z\}$.
• If $\mathbf 0 \in S$, then $S$ is linearly dependent.
• $\{1,x,x^2, \ldots\}$ is linearly independent in $P(\R)$.
• $\{1,\cos(x), \sin(x), \cos(2x), \sin(2x), \ldots\}$ is linearly independent in $C(I,\R)$.