Search for probability and statistics terms on Statlect
StatLect

Linear combinations

by , PhD

This lecture is about linear combinations of vectors and matrices. Linear combinations are obtained by multiplying matrices by scalars, and by adding them together. Therefore, in order to understand this lecture you need to be familiar with the concepts introduced in the lectures on Matrix addition and Multiplication of a matrix by a scalar.

Table of Contents

Definition

Let us start by giving a formal definition of linear combination.

Definition Let [eq1] be n matrices having dimension $K	imes L$. A $K	imes L$ matrix $B$ is a linear combination of [eq2] if and only if there exist n scalars [eq3], called coefficients of the linear combination, such that [eq4]

In other words, if you take a set of matrices, you multiply each of them by a scalar, and you add together all the products thus obtained, then you obtain a linear combination.

Note that all the matrices involved in a linear combination need to have the same dimension (otherwise matrix addition would not be possible).

Example Let $A_{1}$ and $A_{2}$ be $2	imes 2$ matrices defined as follows:[eq5]Let $lpha _{1}=2$ and $lpha _{2}=-1$ be two scalars. Then, the matrix[eq6]is a linear combination of $A_{1}$ and $A_{2}$. It is computed as follows:[eq7]

Linear combinations of vectors

Most of the times, in linear algebra we deal with linear combinations of column vectors (or row vectors), that is, matrices that have only one column (or only one row).

Example Let $A_{1}$, $A_{2}$ and $A_{3}$ be $3	imes 1$ column vectors defined as follows:[eq8]Let $B$ be another column vector defined as[eq9]Is $B$ a linear combination of $A_{1}$, $A_{2}$ and $A_{3}$? In order to answer this question, note that a linear combination of $A_{1}$, $A_{2}$ and $A_{3}$ with coefficients $lpha _{1}$, $lpha _{2}$ and $lpha _{3}$ has the following form:[eq10]Now, $B$ is a linear combination of $A_{1}$, $A_{2}$ and $A_{3}$ if and only if we can find $lpha _{1}$, $lpha _{2}$ and $lpha _{3}$ such that [eq11]which is equivalent to[eq12]But we know that two vectors are equal if and only if their corresponding elements are all equal to each other. This means that the above equation is satisfied if and only if the following three equations are simultaneously satisfied:[eq13]The second equation gives us the value of the first coefficient:[eq14]By substituting this value in the third equation, we obtain[eq15]Finally, by substituting the value of $lpha _{2}$ in the first equation, we get[eq16]You can easily check that these values really constitute a solution to our problem:[eq17]Therefore, the answer to our question is affirmative.

Solved exercises

Below you can find some exercises with explained solutions.

Exercise 1

Define two $3	imes 2$ matrices $A_{1}$ and $A_{2}$ as follows:[eq18]Let $lpha _{1}=1/2$ and $lpha _{2}=1$ be two scalars. Compute the linear combination[eq19]

Solution

It is computed as follows:[eq20]

Exercise 2

Let $A_{1}$ and $A_{2}$ be $2	imes 1$ vectors:[eq21]Compute the value of the linear combination[eq22]

Solution

This is done as follows:[eq23]

Exercise 3

Let A be the following $3	imes 2$ matrix:[eq24]Is the $2	imes 1$ zero vector[eq25]a linear combination of the rows of A?

Solution

Denote the rows of A by $A_{1}$, $A_{2}$ and $A_{3}$. A linear combination of $A_{1}$, $A_{2}$ and $A_{3}$ with coefficients $lpha _{1}$, $lpha _{2} $ and $lpha _{3}$ can be written as[eq26]Now, the $2	imes 1$ zero vector is a linear combination of $A_{1}$, $A_{2}$ and $A_{3}$ if and only if there exist coefficients $lpha _{1}$, $lpha _{2}$ and $lpha _{3}$ such that [eq27]which is the same as[eq28]Because two vectors are equal if and only if their corresponding entries are all equal to each other, this equation is satisfied if and only if the following system of two equations is satisfied:[eq29]This can be rewritten as[eq30]This means that, whatever value we choose for $lpha _{1}$, the system is satisfied provided we set [eq31] and [eq32]. For example, if we choose $lpha _{1}=0$, then we need to set[eq33]Therefore, one solution is [eq34]If we choose a different value, say $lpha _{1}=1$, then we have a different solution:[eq35]In the same manner, you can obtain infinitely many solutions by choosing different values of $lpha _{1}$ and changing $lpha _{2}$ and $lpha _{3} $ accordingly. You can easily check that any of these linear combinations indeed give the zero vector as a result. For example, the solution proposed above ($lpha _{1}=1$, $lpha _{2}=-2$, $lpha _{3}=-2$) gives[eq36]

How to cite

Please cite as:

Taboga, Marco (2021). "Linear combinations", Lectures on matrix algebra. https://www.statlect.com/matrix-algebra/linear-combinations.

The books

Most of the learning materials found on this website are now available in a traditional textbook format.