# Linear combinations

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.

## Definition

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

Definition Let be matrices having dimension . A matrix is a linear combination of if and only if there exist scalars , called coefficients of the linear combination, such that

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 and be matrices defined as follows:Let and be two scalars. Then, the matrixis a linear combination of and . It is computed as follows:

## 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 , and be column vectors defined as follows:Let be another column vector defined asIs a linear combination of , and ? In order to answer this question, note that a linear combination of , and with coefficients , and has the following form:Now, is a linear combination of , and if and only if we can find , and such that which is equivalent toBut 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 the following three equations are simultaneously satisfied:The second equation gives us the value of the first coefficient:By substituting this value in the third equation, we obtainFinally, by substituting the value of in the first equation, we getYou can easily check that these values really constitute a solution to our problem:Therefore, the answer to our question is affirmative.

## Solved exercises

Below you can find some exercises with explained solutions.

### Exercise 1

Define two matrices and as follows:Let and be two scalars. Compute the linear combination

Solution

It is computed as follows:

### Exercise 2

Let and be vectors:Compute the value of the linear combination

Solution

This is done as follows:

### Exercise 3

Let be the following matrix:Is the zero vectora linear combination of the rows of ?

Solution

Denote the rows of by , and . A linear combination of , and with coefficients , and can be written asNow, the zero vector is a linear combination of , and if and only if there exist coefficients , and such that which is the same asBecause 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:This can be rewritten asThis means that, whatever value we choose for , the system is satisfied provided we set and . For example, if we choose , then we need to setTherefore, one solution is If we choose a different value, say , then we have a different solution:In the same manner, you can obtain infinitely many solutions by choosing different values of and changing and 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 (, , ) gives

The book

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

Glossary entries
Share