# Linear independence

Short description: Vectors whose linear combinations are nonzero
Linearly independent vectors in $\displaystyle{ \R^3 }$
Linearly dependent vectors in a plane in $\displaystyle{ \R^3. }$

In the theory of vector spaces, a set of vectors is said to be linearly independent if there exists no nontrivial linear combination of the vectors that equals the zero vector. If such a linear combination exists, then the vectors are said to be linearly dependent. These concepts are central to the definition of dimension.[1]

A vector space can be of finite dimension or infinite dimension depending on the maximum number of linearly independent vectors. The definition of linear dependence and the ability to determine whether a subset of vectors in a vector space is linearly dependent are central to determining the dimension of a vector space.

## Definition

A sequence of vectors $\displaystyle{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_k }$ from a vector space V is said to be linearly dependent, if there exist scalars $\displaystyle{ a_1, a_2, \dots, a_k, }$ not all zero, such that

$\displaystyle{ a_1\mathbf{v}_1 + a_2\mathbf{v}_2 + \cdots + a_k\mathbf{v}_k = \mathbf{0}, }$

where $\displaystyle{ \mathbf{0} }$ denotes the zero vector.

This implies that at least one of the scalars is nonzero, say $\displaystyle{ a_1\ne 0 }$, and the above equation is able to be written as

$\displaystyle{ \mathbf{v}_1 = \frac{-a_2}{a_1}\mathbf{v}_2 + \cdots + \frac{-a_k}{a_1} \mathbf{v}_k, }$

if $\displaystyle{ k\gt 1, }$ and $\displaystyle{ \mathbf{v}_1 = \mathbf{0} }$ if $\displaystyle{ k=1. }$

Thus, a set of vectors is linearly dependent if and only if one of them is zero or a linear combination of the others.

A sequence of vectors $\displaystyle{ \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n }$ is said to be linearly independent if it is not linearly dependent, that is, if the equation

$\displaystyle{ a_1\mathbf{v}_1 + a_2 \mathbf{v}_2 + \cdots + a_n\mathbf{v}_n = \mathbf{0}, }$

can only be satisfied by $\displaystyle{ a_i=0 }$ for $\displaystyle{ i=1,\dots,n. }$ This implies that no vector in the sequence can be represented as a linear combination of the remaining vectors in the sequence. In other words, a sequence of vectors is linearly independent if the only representation of $\displaystyle{ \mathbf 0 }$ as a linear combination of its vectors is the trivial representation in which all the scalars $\displaystyle{ a_i }$ are zero.[2] Even more concisely, a sequence of vectors is linearly independent if and only if $\displaystyle{ \mathbf 0 }$ can be represented as a linear combination of its vectors in a unique way.

If a sequence of vectors contains the same vector twice, it is necessarily dependent. The linear dependency of a sequence of vectors does not depend of the order of the terms in the sequence. This allows defining linear independence for a finite set of vectors: A finite set of vectors is linearly independent if the sequence obtained by ordering them is linearly independent. In other words, one has the following result that is often useful.

A sequence of vectors is linearly independent if and only if it does not contain the same vector twice and the set of its vectors is linearly independent.

### Infinite case

An infinite set of vectors is linearly independent if every nonempty finite subset is linearly independent. Conversely, an infinite set of vectors is linearly dependent if it contains a finite subset that is linearly dependent, or equivalently, if some vector in the set is a linear combination of other vectors in the set.

An indexed family of vectors is linearly independent if it does not contain the same vector twice, and if the set of its vectors is linearly independent. Otherwise, the family is said linearly dependent.

A set of vectors which is linearly independent and spans some vector space, forms a basis for that vector space. For example, the vector space of all polynomials in x over the reals has the (infinite) subset {1, x, x2, ...} as a basis.

## Geometric examples

• $\displaystyle{ \vec u }$ and $\displaystyle{ \vec v }$ are independent and define the plane P.
• $\displaystyle{ \vec u }$, $\displaystyle{ \vec v }$ and $\displaystyle{ \vec w }$ are dependent because all three are contained in the same plane.
• $\displaystyle{ \vec u }$ and $\displaystyle{ \vec j }$ are dependent because they are parallel to each other.
• $\displaystyle{ \vec u }$ , $\displaystyle{ \vec v }$ and $\displaystyle{ \vec k }$ are independent because $\displaystyle{ \vec u }$ and $\displaystyle{ \vec v }$ are independent of each other and $\displaystyle{ \vec k }$ is not a linear combination of them or, equivalently, because they do not belong to a common plane. The three vectors define a three-dimensional space.
• The vectors $\displaystyle{ \vec o }$ (null vector, whose components are equal to zero) and $\displaystyle{ \vec k }$ are dependent since $\displaystyle{ \vec o = 0 \vec k }$

### Geographic location

A person describing the location of a certain place might say, "It is 3 miles north and 4 miles east of here." This is sufficient information to describe the location, because the geographic coordinate system may be considered as a 2-dimensional vector space (ignoring altitude and the curvature of the Earth's surface). The person might add, "The place is 5 miles northeast of here." This last statement is true, but it is not necessary to find the location.

In this example the "3 miles north" vector and the "4 miles east" vector are linearly independent. That is to say, the north vector cannot be described in terms of the east vector, and vice versa. The third "5 miles northeast" vector is a linear combination of the other two vectors, and it makes the set of vectors linearly dependent, that is, one of the three vectors is unnecessary to define a specific location on a plane.

Also note that if altitude is not ignored, it becomes necessary to add a third vector to the linearly independent set. In general, n linearly independent vectors are required to describe all locations in n-dimensional space.

## Evaluating linear independence

### The zero vector

If one or more vectors from a given sequence of vectors $\displaystyle{ \mathbf{v}_1, \dots, \mathbf{v}_k }$ is the zero vector $\displaystyle{ \mathbf{0} }$ then the vector $\displaystyle{ \mathbf{v}_1, \dots, \mathbf{v}_k }$ are necessarily linearly dependent (and consequently, they are not linearly independent). To see why, suppose that $\displaystyle{ i }$ is an index (i.e. an element of $\displaystyle{ \{ 1, \ldots, k \} }$) such that $\displaystyle{ \mathbf{v}_i = \mathbf{0}. }$ Then let $\displaystyle{ a_{i} := 1 }$ (alternatively, letting $\displaystyle{ a_{i} }$ be equal any other non-zero scalar will also work) and then let all other scalars be $\displaystyle{ 0 }$ (explicitly, this means that for any index $\displaystyle{ j }$ other than $\displaystyle{ i }$ (i.e. for $\displaystyle{ j \neq i }$), let $\displaystyle{ a_{j} := 0 }$ so that consequently $\displaystyle{ a_{j} \mathbf{v}_j = 0 \mathbf{v}_j = \mathbf{0} }$). Simplifying $\displaystyle{ a_1 \mathbf{v}_1 + \cdots + a_k\mathbf{v}_k }$ gives:

$\displaystyle{ a_1 \mathbf{v}_1 + \cdots + a_k\mathbf{v}_k = \mathbf{0} + \cdots + \mathbf{0} + a_i \mathbf{v}_i + \mathbf{0} + \cdots + \mathbf{0} = a_i \mathbf{v}_i = a_i \mathbf{0} = \mathbf{0}. }$

Because not all scalars are zero (in particular, $\displaystyle{ a_{i} \neq 0 }$), this proves that the vectors $\displaystyle{ \mathbf{v}_1, \dots, \mathbf{v}_k }$ are linearly dependent.

As a consequence, the zero vector can not possibly belong to any collection of vectors that is linearly independent.

Now consider the special case where the sequence of $\displaystyle{ \mathbf{v}_1, \dots, \mathbf{v}_k }$ has length $\displaystyle{ 1 }$ (i.e. the case where $\displaystyle{ k = 1 }$). A collection of vectors that consists of exactly one vector is linearly dependent if and only if that vector is zero. Explicitly, if $\displaystyle{ \mathbf{v}_1 }$ is any vector then the sequence $\displaystyle{ \mathbf{v}_1 }$ (which is a sequence of length $\displaystyle{ 1 }$) is linearly dependent if and only if $\displaystyle{ \mathbf{v}_1 = \mathbf{0} }$; alternatively, the collection $\displaystyle{ \mathbf{v}_1 }$ is linearly independent if and only if $\displaystyle{ \mathbf{v}_1 \neq \mathbf{0}. }$

### Linear dependence and independence of two vectors

This example considers the special case where there are exactly two vector $\displaystyle{ \mathbf{u} }$ and $\displaystyle{ \mathbf{v} }$ from some real or complex vector space. The vectors $\displaystyle{ \mathbf{u} }$ and $\displaystyle{ \mathbf{v} }$ are linearly dependent if and only if at least one of the following is true:

1. $\displaystyle{ \mathbf{u} }$ is a scalar multiple of $\displaystyle{ \mathbf{v} }$ (explicitly, this means that there exists a scalar $\displaystyle{ c }$ such that $\displaystyle{ \mathbf{u} = c \mathbf{v} }$) or
2. $\displaystyle{ \mathbf{v} }$ is a scalar multiple of $\displaystyle{ \mathbf{u} }$ (explicitly, this means that there exists a scalar $\displaystyle{ c }$ such that $\displaystyle{ \mathbf{v} = c \mathbf{u} }$).

If $\displaystyle{ \mathbf{u} = \mathbf{0} }$ then by setting $\displaystyle{ c := 0 }$ we have $\displaystyle{ c \mathbf{v} = 0 \mathbf{v} = \mathbf{0} = \mathbf{u} }$ (this equality holds no matter what the value of $\displaystyle{ \mathbf{v} }$ is), which shows that (1) is true in this particular case. Similarly, if $\displaystyle{ \mathbf{v} = \mathbf{0} }$ then (2) is true because $\displaystyle{ \mathbf{v} = 0 \mathbf{u}. }$ If $\displaystyle{ \mathbf{u} = \mathbf{v} }$ (for instance, if they are both equal to the zero vector $\displaystyle{ \mathbf{0} }$) then both (1) and (2) are true (by using $\displaystyle{ c := 1 }$ for both).

If $\displaystyle{ \mathbf{u} = c \mathbf{v} }$ then $\displaystyle{ \mathbf{u} \neq \mathbf{0} }$ is only possible if $\displaystyle{ c \neq 0 }$ and $\displaystyle{ \mathbf{v} \neq \mathbf{0} }$; in this case, it is possible to multiply both sides by $\displaystyle{ \frac{1}{c} }$ to conclude $\displaystyle{ \mathbf{v} = \frac{1}{c} \mathbf{u}. }$ This shows that if $\displaystyle{ \mathbf{u} \neq \mathbf{0} }$ and $\displaystyle{ \mathbf{v} \neq \mathbf{0} }$ then (1) is true if and only if (2) is true; that is, in this particular case either both (1) and (2) are true (and the vectors are linearly dependent) or else both (1) and (2) are false (and the vectors are linearly independent). If $\displaystyle{ \mathbf{u} = c \mathbf{v} }$ but instead $\displaystyle{ \mathbf{u} = \mathbf{0} }$ then at least one of $\displaystyle{ c }$ and $\displaystyle{ \mathbf{v} }$ must be zero. Moreover, if exactly one of $\displaystyle{ \mathbf{u} }$ and $\displaystyle{ \mathbf{v} }$ is $\displaystyle{ \mathbf{0} }$ (while the other is non-zero) then exactly one of (1) and (2) is true (with the other being false).

The vectors $\displaystyle{ \mathbf{u} }$ and $\displaystyle{ \mathbf{v} }$ are linearly independent if and only if $\displaystyle{ \mathbf{u} }$ is not a scalar multiple of $\displaystyle{ \mathbf{v} }$ and $\displaystyle{ \mathbf{v} }$ is not a scalar multiple of $\displaystyle{ \mathbf{u} }$.

### Vectors in R2

Three vectors: Consider the set of vectors $\displaystyle{ \mathbf{v}_1 = (1, 1), }$ $\displaystyle{ \mathbf{v}_2 = (-3, 2), }$ and $\displaystyle{ \mathbf{v}_3 = (2, 4), }$ then the condition for linear dependence seeks a set of non-zero scalars, such that

$\displaystyle{ a_1 \begin{bmatrix} 1\\1\end{bmatrix} + a_2 \begin{bmatrix} -3\\2\end{bmatrix} + a_3 \begin{bmatrix} 2\\4\end{bmatrix} =\begin{bmatrix} 0\\0\end{bmatrix}, }$

or

$\displaystyle{ \begin{bmatrix} 1 & -3 & 2 \\ 1 & 2 & 4 \end{bmatrix}\begin{bmatrix} a_1\\ a_2 \\ a_3 \end{bmatrix}= \begin{bmatrix} 0\\0\end{bmatrix}. }$

Row reduce this matrix equation by subtracting the first row from the second to obtain,

$\displaystyle{ \begin{bmatrix} 1 & -3 & 2 \\ 0 & 5 & 2 \end{bmatrix}\begin{bmatrix} a_1\\ a_2 \\ a_3 \end{bmatrix}= \begin{bmatrix} 0\\0\end{bmatrix}. }$

Continue the row reduction by (i) dividing the second row by 5, and then (ii) multiplying by 3 and adding to the first row, that is

$\displaystyle{ \begin{bmatrix} 1 & 0 & 16/5 \\ 0 & 1 & 2/5 \end{bmatrix}\begin{bmatrix} a_1\\ a_2 \\ a_3 \end{bmatrix}= \begin{bmatrix} 0\\0\end{bmatrix}. }$

Rearranging this equation allows us to obtain

$\displaystyle{ \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} a_1\\ a_2 \end{bmatrix}= \begin{bmatrix} a_1\\ a_2 \end{bmatrix}=-a_3\begin{bmatrix} 16/5\\2/5\end{bmatrix}. }$

which shows that non-zero ai exist such that $\displaystyle{ \mathbf{v}_3 = (2, 4) }$ can be defined in terms of $\displaystyle{ \mathbf{v}_1 = (1, 1) }$ and $\displaystyle{ \mathbf{v}_2 = (-3, 2). }$ Thus, the three vectors are linearly dependent.

Two vectors: Now consider the linear dependence of the two vectors $\displaystyle{ \mathbf{v}_1 = (1, 1) }$ and $\displaystyle{ \mathbf{v}_2 = (-3, 2), }$ and check,

$\displaystyle{ a_1 \begin{bmatrix} 1\\1\end{bmatrix} + a_2 \begin{bmatrix} -3\\2\end{bmatrix} =\begin{bmatrix} 0\\0\end{bmatrix}, }$

or

$\displaystyle{ \begin{bmatrix} 1 & -3 \\ 1 & 2 \end{bmatrix}\begin{bmatrix} a_1\\ a_2 \end{bmatrix}= \begin{bmatrix} 0\\0\end{bmatrix}. }$

The same row reduction presented above yields,

$\displaystyle{ \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}\begin{bmatrix} a_1\\ a_2 \end{bmatrix}= \begin{bmatrix} 0\\0\end{bmatrix}. }$

This shows that $\displaystyle{ a_i = 0, }$ which means that the vectors v1 = (1, 1) and v2 = (−3, 2) are linearly independent.

### Vectors in R4

In order to determine if the three vectors in $\displaystyle{ \mathbb{R}^4, }$

$\displaystyle{ \mathbf{v}_1= \begin{bmatrix}1\\4\\2\\-3\end{bmatrix}, \mathbf{v}_2=\begin{bmatrix}7\\10\\-4\\-1\end{bmatrix}, \mathbf{v}_3=\begin{bmatrix}-2\\1\\5\\-4\end{bmatrix}. }$

are linearly dependent, form the matrix equation,

$\displaystyle{ \begin{bmatrix}1&7&-2\\4& 10& 1\\2&-4&5\\-3&-1&-4\end{bmatrix}\begin{bmatrix} a_1\\ a_2 \\ a_3 \end{bmatrix} = \begin{bmatrix}0\\0\\0\\0\end{bmatrix}. }$

Row reduce this equation to obtain,

$\displaystyle{ \begin{bmatrix} 1& 7 & -2 \\ 0& -18& 9\\ 0 & 0 & 0\\ 0& 0& 0\end{bmatrix} \begin{bmatrix} a_1\\ a_2 \\ a_3 \end{bmatrix} = \begin{bmatrix}0\\0\\0\\0\end{bmatrix}. }$

Rearrange to solve for v3 and obtain,

$\displaystyle{ \begin{bmatrix} 1& 7 \\ 0& -18 \end{bmatrix} \begin{bmatrix} a_1\\ a_2 \end{bmatrix} = -a_3\begin{bmatrix}-2\\9\end{bmatrix}. }$

This equation is easily solved to define non-zero ai,

$\displaystyle{ a_1 = -3 a_3 /2, a_2 = a_3/2, }$

where $\displaystyle{ a_3 }$ can be chosen arbitrarily. Thus, the vectors $\displaystyle{ \mathbf{v}_1, \mathbf{v}_2, }$ and $\displaystyle{ \mathbf{v}_3 }$ are linearly dependent.

### Alternative method using determinants

An alternative method relies on the fact that $\displaystyle{ n }$ vectors in $\displaystyle{ \mathbb{R}^n }$ are linearly independent if and only if the determinant of the matrix formed by taking the vectors as its columns is non-zero.

In this case, the matrix formed by the vectors is

$\displaystyle{ A = \begin{bmatrix}1&-3\\1&2\end{bmatrix} . }$

We may write a linear combination of the columns as

$\displaystyle{ A \Lambda = \begin{bmatrix}1&-3\\1&2\end{bmatrix} \begin{bmatrix}\lambda_1 \\ \lambda_2 \end{bmatrix} . }$

We are interested in whether AΛ = 0 for some nonzero vector Λ. This depends on the determinant of $\displaystyle{ A }$, which is

$\displaystyle{ \det A = 1\cdot2 - 1\cdot(-3) = 5 \ne 0. }$

Since the determinant is non-zero, the vectors $\displaystyle{ (1, 1) }$ and $\displaystyle{ (-3, 2) }$ are linearly independent.

Otherwise, suppose we have $\displaystyle{ m }$ vectors of $\displaystyle{ n }$ coordinates, with $\displaystyle{ m \lt n. }$ Then A is an n×m matrix and Λ is a column vector with $\displaystyle{ m }$ entries, and we are again interested in AΛ = 0. As we saw previously, this is equivalent to a list of $\displaystyle{ n }$ equations. Consider the first $\displaystyle{ m }$ rows of $\displaystyle{ A }$, the first $\displaystyle{ m }$ equations; any solution of the full list of equations must also be true of the reduced list. In fact, if i1,...,im is any list of $\displaystyle{ m }$ rows, then the equation must be true for those rows.

$\displaystyle{ A_{\lang i_1,\dots,i_m \rang} \Lambda = \mathbf{0} . }$

Furthermore, the reverse is true. That is, we can test whether the $\displaystyle{ m }$ vectors are linearly dependent by testing whether

$\displaystyle{ \det A_{\lang i_1,\dots,i_m \rang} = 0 }$

for all possible lists of $\displaystyle{ m }$ rows. (In case $\displaystyle{ m = n }$, this requires only one determinant, as above. If $\displaystyle{ m \gt n }$, then it is a theorem that the vectors must be linearly dependent.) This fact is valuable for theory; in practical calculations more efficient methods are available.

### More vectors than dimensions

If there are more vectors than dimensions, the vectors are linearly dependent. This is illustrated in the example above of three vectors in $\displaystyle{ \R^2. }$

## Natural basis vectors

Let $\displaystyle{ V = \R^n }$ and consider the following elements in $\displaystyle{ V }$, known as the natural basis vectors:

$\displaystyle{ \begin{matrix} \mathbf{e}_1 & = & (1,0,0,\ldots,0) \\ \mathbf{e}_2 & = & (0,1,0,\ldots,0) \\ & \vdots \\ \mathbf{e}_n & = & (0,0,0,\ldots,1).\end{matrix} }$

Then $\displaystyle{ \mathbf{e}_1, \mathbf{e}_2, \ldots, \mathbf{e}_n }$ are linearly independent.

## Linear independence of functions

Let $\displaystyle{ V }$ be the vector space of all differentiable functions of a real variable $\displaystyle{ t }$. Then the functions $\displaystyle{ e^t }$ and $\displaystyle{ e^{2t} }$ in $\displaystyle{ V }$ are linearly independent.

### Proof

Suppose $\displaystyle{ a }$ and $\displaystyle{ b }$ are two real numbers such that

$\displaystyle{ ae ^ t + be ^ {2t} = 0 }$

Take the first derivative of the above equation:

$\displaystyle{ ae ^ t + 2be ^ {2t} = 0 }$

for all values of $\displaystyle{ t. }$ We need to show that $\displaystyle{ a = 0 }$ and $\displaystyle{ b = 0. }$ In order to do this, we subtract the first equation from the second, giving $\displaystyle{ be^{2t} = 0 }$. Since $\displaystyle{ e^{2t} }$ is not zero for some $\displaystyle{ t }$, $\displaystyle{ b=0. }$ It follows that $\displaystyle{ a = 0 }$ too. Therefore, according to the definition of linear independence, $\displaystyle{ e^{t} }$ and $\displaystyle{ e^{2t} }$ are linearly independent.

## Space of linear dependencies

A linear dependency or linear relation among vectors v1, ..., vn is a tuple (a1, ..., an) with n scalar components such that

$\displaystyle{ a_1 \mathbf{v}_1 + \cdots + a_n \mathbf{v}_n= \mathbf{0}. }$

If such a linear dependence exists with at least a nonzero component, then the n vectors are linearly dependent. Linear dependencies among v1, ..., vn form a vector space.

If the vectors are expressed by their coordinates, then the linear dependencies are the solutions of a homogeneous system of linear equations, with the coordinates of the vectors as coefficients. A basis of the vector space of linear dependencies can therefore be computed by Gaussian elimination.

## Generalizations

### Affine independence

A set of vectors is said to be affinely dependent if at least one of the vectors in the set can be defined as an affine combination of the others. Otherwise, the set is called affinely independent. Any affine combination is a linear combination; therefore every affinely dependent set is linearly dependent. Conversely, every linearly independent set is affinely independent.

Consider a set of $\displaystyle{ m }$ vectors $\displaystyle{ \mathbf{v}_1, \ldots, \mathbf{v}_m }$ of size $\displaystyle{ n }$ each, and consider the set of $\displaystyle{ m }$ augmented vectors $\displaystyle{ \left(\left[\begin{smallmatrix} 1 \\ \mathbf{v}_1\end{smallmatrix}\right], \ldots, \left[\begin{smallmatrix}1 \\ \mathbf{v}_m\end{smallmatrix}\right]\right) }$ of size $\displaystyle{ n + 1 }$ each. The original vectors are affinely independent if and only if the augmented vectors are linearly independent.[3]:256

### Linearly independent vector subspaces

Two vector subspaces $\displaystyle{ M }$ and $\displaystyle{ N }$ of a vector space $\displaystyle{ X }$ are said to be linearly independent if $\displaystyle{ M \cap N = \{0\}. }$[4] More generally, a collection $\displaystyle{ M_1, \ldots, M_d }$ of subspaces of $\displaystyle{ X }$ are said to be linearly independent if $\displaystyle{ M_i \cap \sum_{k \neq i} M_k = \{0\} }$ for every index $\displaystyle{ i, }$ where $\displaystyle{ \sum_{k \neq i} M_k = \Big\{m_1 + \cdots + m_{i-1} + m_{i+1} + \cdots + m_d : m_k \in M_k \text{ for all } k\Big\} = \operatorname{span} \bigcup_{k \in \{1,\ldots,i-1,i+1,\ldots,d\}} M_k. }$[4] The vector space $\displaystyle{ X }$ is said to be a direct sum of $\displaystyle{ M_1, \ldots, M_d }$ if these subspaces are linearly independent and $\displaystyle{ M_1 + \cdots + M_d = X. }$