3.7. Linear combination of vectors#

Definition 3.8 (Linear combination of vectors)

Let \(\vec{v},\vec{u}_1,\dots,\vec{u}_m\in\mathbb{R}^n\) such that

(3.6)#\[ \vec{v}=\alpha_1\vec{u}_1+\alpha_2\vec{u}_2+\dots+\alpha_m\vec{u}_m, \]

for some \(\alpha_1,\alpha_2,\dots,\alpha_m\in \mathbb{R}\) [1]. Such a sum is called a linear combination of vectors.

For example

\[\begin{split} \begin{align*} \begin{pmatrix} 2 \\ 0 \\ 7 \end{pmatrix} = 2\begin{pmatrix} 1 \\ 5 \\ -1 \end{pmatrix} + \begin{pmatrix} 0 \\ -10 \\ 9 \end{pmatrix}, \end{align*} \end{split}\]

and so we have expressed \((2,0,7)^\mathsf{T}\) as a linear combination of the vectors \((1,5,-1)^\mathsf{T}\) and \((0,-10,9)^\mathsf{T}\). To write a vector \(\vec{v}\) as a linear combination of vectors \(\vec{u}_1, \vec{u}_2, \ldots, \vec{u}_m\) we need to calculate the values of the coefficients \(\alpha_1, \alpha_2, \ldots, \alpha_m\) from equation (3.6). To do this we need to solve the system of linear equations

\[ \vec{u}_1 \alpha_1 + \vec{u}_2 \alpha_2 + \cdots + \vec{u}_m \alpha_m = \vec{v}\]

which can be written as the augmented matrix

\[\begin{split} \left( \begin{array}{cccc|c} \uparrow & \uparrow & & \uparrow & \uparrow \\ \vec{u}_1 & \vec{u}_2 & \cdots & \vec{u}_m & \vec{v} \\ \downarrow & \downarrow & & \downarrow & \downarrow \end{array} \right)\end{split}\]

and the values of the coefficients \(\alpha_1, \alpha_2, \ldots, \alpha_m\) can be calculated using Gaussian elimination.

Example 3.6

Express the vector \(\vec{v} = (7, -2, -11)^\mathsf{T}\) as a linear combination of the vectors

\[\begin{split} \begin{align*} \vec{u}_1 &= \begin{pmatrix} 1 \\ 0 \\ 7 \end{pmatrix}, & \vec{u}_2 &= \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix}, & \vec{u}_3 &= \begin{pmatrix} 5 \\ -2 \\ -6 \end{pmatrix}. \end{align*} \end{split}\]
Solution

We need to find the values of the coefficients \(\alpha_1\), \(\alpha_2\) and \(\alpha_3\) in the following linear combination

\[\begin{split} \begin{align*} \alpha_1 \begin{pmatrix} 1 \\ 0 \\ 7 \end{pmatrix} + \alpha_2 \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix} + \alpha_3 \begin{pmatrix} 5 \\ -2 \\ -6 \end{pmatrix} &= \begin{pmatrix} 7 \\ -2 \\ -11 \end{pmatrix}, \end{align*} \end{split}\]

so we need the solution to the linear system

\[\begin{split} \begin{align*} \alpha_1 + 2\alpha_2 + 5\alpha_3 &= 7, \\ -\alpha_2 - 2\alpha_3 &= -2, \\ 7\alpha_1 + 3\alpha_2 - 6\alpha_3 &= -11. \end{align*} \end{split}\]

Using Gauss-Jordan elimination

\[\begin{split} \begin{align*} &\left( \begin{array}{ccc|c} 1 & 2 & 5 & 7 \\ 0 & -1 & -2 & -2 \\ 7 & 3 & -6 & -11 \end{array} \right) \begin{array}{l} \phantom{x} \\ \phantom{x} \\ R_3 - 7R_1 \end{array} & \longrightarrow & \left( \begin{array}{ccc|c} 1 & 2 & 5 & 7 \\ 0 & -1 & -2 & -2 \\ 0 & -11 & -41 & -60 \end{array} \right) \begin{array}{l} \\ -R_2 \\ \phantom{x} \end{array} \\ \\ \longrightarrow & \left( \begin{array}{ccc|c} 1 & 2 & 5 & 7 \\ 0 & 1 & 2 & 2 \\ 0 & -11 & -41 & -60 \end{array} \right) \begin{array}{l} R_1 - 2R2 \\ \\ R_3 + 11R_2 \end{array} & \longrightarrow & \left( \begin{array}{ccc|c} 1 & 0 & 1 & 3 \\ 0 & 1 & 2 & 2 \\ 0 & 0 & -19 & -38 \end{array} \right) \begin{array}{l} \\ \\ -\frac{1}{19} R_3 \end{array} \\ \\ \longrightarrow & \left( \begin{array}{ccc|c} 1 & 0 & 1 & 3 \\ 0 & 1 & 2 & 2 \\ 0 & 0 & 1 & 2 \end{array} \right) \begin{array}{l} R_1 - R_3 \\ R_2 - 2R_3 \\ \phantom{x} \end{array} & \longrightarrow & \left( \begin{array}{ccc|c} 1 & 0 & 0 & 1 \\ 0 & 1 & 0 & -2 \\ 0 & 0 & 1 & 2 \end{array} \right), \end{align*} \end{split}\]

so \(\alpha_1 = 1\), \(\alpha_2 = -2\) and \(\alpha_3 = 2\). Therefore \(\vec{v}\) can be expressed as the linear combination of vectors

\[\begin{split} \begin{align*} \vec{v} = \vec{u}_1 - 2\vec{u}_2 + 2\vec{u}_3 = \begin{pmatrix} 1 \\ 0 \\ 7 \end{pmatrix} - 2 \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix} + 2 \begin{pmatrix} 5 \\ -2 \\ -6 \end{pmatrix} &= \begin{pmatrix} 7 \\ -2 \\ -11 \end{pmatrix} \end{align*} \end{split}\]

3.7.1. Basis vectors#

A special type of vector is a basis vector which all other vectors in the space can be represented as a linear combination of the basis vectors (we will cover basis in more detail later). In a Cartesian space the simplest basis vectors are unit vectors that point in the co-ordinate directions. In \(\mathbb{R}^3\) we use the basis vectors \(\vec{i} = (1, 0, 0)^\mathsf{T}\), \(\vec{j} = (0, 1, 0)^\mathsf{T}\) and \(\vec{k} = (0, 0, 1)^\mathsf{T}\) (Fig. 3.11).

../_images/3_basis_vectors.svg

Fig. 3.11 The three basis vectors in \(\mathbb{R}^3\).#

Using basis vectors we can represent any vector, \(\vec{a} = (a_1, a_2, a_3)^\mathsf{T}\) say, as a linear combination of \(\vec{i}\), \(\vec{j}\) and \(\vec{k}\), i.e.,

\[\begin{split} \begin{align*}a_1 \vec{i} + a_2 \vec{j} + a_3 \vec{k} = a_1 \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix} + a_2 \begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix} + a_3 \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix} = \vec{a}. \end{align*} \end{split}\]

For example

\[\begin{split} \begin{pmatrix} 2 \\ 5 \\ 3 \end{pmatrix} = 2 \vec{i} + 5 \vec{j} + 3 \vec{k}. \end{split}\]