web analytics
Skip to main content

Section 2.2 Matrix multiplication and linear combinations

Definition 2.2.0.1.

The product of a matrix \(A\) by a vector \(\xvec\) will be the linear combination of the columns of \(A\) using the components of \(\xvec\) as weights.
If \(A\) is an \(m\times n\) matrix, then \(\xvec\) must be an \(n\)-dimensional vector, and the product \(A\xvec\) will be an \(m\)-dimensional vector. If
\begin{equation*} A=\left[\begin{array}{rrrr} \vvec_1 \amp \vvec_2 \amp \ldots \amp \vvec_n \end{array}\right], \xvec = \left[\begin{array}{r} c_1 \\ c_2 \\ \vdots \\ c_n \end{array}\right], \end{equation*}
then
\begin{equation*} A\xvec = c_1\vvec_1 + c_2\vvec_2 + \ldots c_n\vvec_n\text{.} \end{equation*}

Activity 2.2.0.1.

Use the definition of matrix multiplication to find the product of a matrix and a vector.

(a)

Find the matrix product
\begin{equation*} \left[ \begin{array}{rrrr} 1 \amp 2 \amp 0 \amp -1 \\ 2 \amp 4 \amp -3 \amp -2 \\ -1 \amp -2 \amp 6 \amp 1 \\ \end{array} \right] \left[ \begin{array}{r} 3 \\ 1 \\ -1 \\ 1 \\ \end{array} \right]\text{.} \end{equation*}

(b)

Suppose that \(A\) is the matrix
\begin{equation*} \left[ \begin{array}{rrr} 3 \amp -1 \amp 0 \\ 0 \amp -2 \amp 4 \\ 2 \amp 1 \amp 5 \\ 1 \amp 0 \amp 3 \\ \end{array} \right]\text{.} \end{equation*}
If \(A\xvec\) is defined, what is the dimension of the vector \(\xvec\) and what is the dimension of \(A\xvec\text{?}\)

Activity 2.2.0.2.

A vector whose entries are all zero is denoted by \(\zerovec\text{.}\) If \(A\) is a matrix, what is the product \(A\zerovec\text{?}\)

Activity 2.2.0.3.

Suppose that \(I = \left[\begin{array}{rrr} 1 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \\ 0 \amp 0 \amp 1 \\ \end{array}\right]\) is the identity matrix and \(\xvec=\threevec{x_1}{x_2}{x_3}\text{.}\) Find the product \(I\xvec\) and be able to explain why \(I\) is called the identity matrix.

Activity 2.2.0.4.

Suppose we write the matrix \(A\) in terms of its columns as
\begin{equation*} A = \left[ \begin{array}{rrrr} \vvec_1 \amp \vvec_2 \amp \ldots \amp \vvec_n \\ \end{array} \right]\text{.} \end{equation*}

(a)

If the vector \(\evec_1 = \left[\begin{array}{r} 1 \\ 0 \\ \vdots \\ 0 \end{array}\right]\text{,}\) what is the product \(A\evec_1\text{?}\)

(b)

Suppose that
\begin{equation*} A = \left[ \begin{array}{rrrr} 1 \amp 2 \\ -1 \amp 1 \\ \end{array} \right], \bvec = \left[ \begin{array}{r} 6 \\ 0 \end{array} \right]\text{.} \end{equation*}
Is there a vector \(\xvec\) such that \(A\xvec = \bvec\text{?}\)

Activity 2.2.0.5. The equation \(A\xvec = \bvec\).

We can now relate a matrix equation to a system of equations, where the vector \(\xvec\) is a vector whose coordinates are the variables in the system of equations.

(a)

Consider the linear system
\begin{equation*} \begin{alignedat}{4} 2x \amp {}+{} \amp y \amp {}-{} \amp 3z \amp {}={} \amp 4 \\ -x \amp {}+{} \amp 2y \amp {}+{} \amp z \amp {}={} \amp 3 \\ 3x \amp {}-{} \amp y \amp \amp \amp {}={} \amp -4 \\ \end{alignedat}\text{.} \end{equation*}
Identify the matrix \(A\) and vector \(\bvec\) to express this system in the form \(A\xvec = \bvec\text{.}\)

(b)

If \(A\) and \(\bvec\) are as below, write the linear system corresponding to the equation \(A\xvec=\bvec\text{.}\)
\begin{equation*} A = \left[\begin{array}{rrr} 3 \amp -1 \amp 0 \\ -2 \amp 0 \amp 6 \end{array} \right], \bvec = \left[\begin{array}{r} -6 \\ 2 \end{array} \right] \end{equation*}
and describe the solution space in set notation.

(c)

Describe the solution space (in set notation) of the equation
\begin{equation*} \left[ \begin{array}{rrrr} 1 \amp 2 \amp 0 \amp -1 \\ 2 \amp 4 \amp -3 \amp -2 \\ -1 \amp -2 \amp 6 \amp 1 \\ \end{array} \right] \xvec = \left[\begin{array}{r} -1 \\ 1 \\ 5 \end{array} \right]\text{.} \end{equation*}

Activity 2.2.0.6.

Suppose \(A\) is an \(m\times n\) matrix. Give the statement that best describes the solution space of the equation \(A\xvec = \zerovec\text{.}\)
  1. We can't determine anything about the solution space without the actual matrix \(A\text{.}\)
  2. The only solution for \(A\xvec = \zerovec\) is \(\xvec=\zerovec\text{.}\)
  3. The system is always consistent, but we can't determine any solutions without knowing \(A\text{.}\)
  4. The system is always consistent, and must contain \(\zerovec\text{,}\) but may also contain additional solutions.

Activity 2.2.0.7.

Consider the matrices
\begin{equation*} A = \left[\begin{array}{rrr} 1 \amp 3 \amp 2 \\ -3 \amp 4 \amp -1 \\ \end{array}\right], B = \left[\begin{array}{rr} 3 \amp 0 \\ 1 \amp 2 \\ -2 \amp -1 \\ \end{array}\right]\text{.} \end{equation*}

(a)

Suppose we want to form the product \(AB\text{.}\) Before computing, first make sure you can explain how you know this product exists and then give the dimensions of the resulting matrix.

(b)

Compute the product \(AB\text{.}\)

(c)

Sage can multiply matrices using the * operator. Define the matrices \(A\) and \(B\) in the Sage cell below and check your work by computing \(AB\text{.}\)

(d)

Are you able to form the matrix product \(BA\text{?}\) If so, use the Sage cell above to find \(BA\text{.}\) Is it generally true that \(AB = BA\text{?}\)

Activity 2.2.0.8.

Suppose we form the three matrices.
\begin{equation*} A = \left[\begin{array}{rr} 1 \amp 2 \\ 3 \amp -2 \\ \end{array}\right], B = \left[\begin{array}{rr} 0 \amp 4 \\ 2 \amp -1 \\ \end{array}\right], C = \left[\begin{array}{rr} -1 \amp 3 \\ 4 \amp 3 \\ \end{array}\right]\text{.} \end{equation*}

(a)

Compare what happens when you compute \(A(B+C)\) and \(AB + AC\text{.}\) State your finding as a general principle.

(b)

Compare the results of evaluating \(A(BC)\) and \((AB)C\) and state your finding as a general principle.

Activity 2.2.0.9.

When we are dealing with real numbers, we know if \(a\neq 0\) and \(ab = ac\text{,}\) then \(b=c\text{.}\) Define matrices
\begin{equation*} A = \left[\begin{array}{rr} 1 \amp 2 \\ -2 \amp -4 \\ \end{array}\right], B = \left[\begin{array}{rr} 3 \amp 0 \\ 1 \amp 3 \\ \end{array}\right], C = \left[\begin{array}{rr} 1 \amp 2 \\ 2 \amp 2 \\ \end{array}\right]. \end{equation*}

(a)

Compute \(AB\) and \(AC\text{.}\)

(b)

If \(AB = AC\text{,}\) is it necessarily true that \(B = C\text{?}\)

Activity 2.2.0.10.

Again, with real numbers, we know that if \(ab = 0\text{,}\) then either \(a = 0\) or \(b=0\text{.}\) Define
\begin{equation*} A = \left[\begin{array}{rr} 1 \amp 2 \\ -2 \amp -4 \\ \end{array}\right], B = \left[\begin{array}{rr} 2 \amp -4 \\ -1 \amp 2 \\ \end{array}\right]\text{.} \end{equation*}

(a)

Compute \(AB\text{.}\)

(b)

If \(AB = 0\text{,}\) is it necessarily true that either \(A=0\) or \(B=0\text{?}\)