<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />

# Matrix Algebra

## Add, subtract, and multiply matrices based on the positions of entries.

Estimated17 minsto complete
%
Progress
Practice Matrix Algebra

MEMORY METER
This indicates how strong in your memory this concept is
Progress
Estimated17 minsto complete
%
Matrix Operations
Algebra refers to your ability to manipulate variables and unknowns based on rules and properties. Matrix algebra is extremely similar to the algebra you already know for numbers with a few important differences.  What are these differences?

### Algebra with Matrices

Two matrices of the same order can be added by summing the entries in the corresponding positions.

\begin{align*}\begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{bmatrix}+\begin{bmatrix} 6 & 5 & 4\\ 3 & 2 & 1 \end{bmatrix}=\begin{bmatrix} 7 & 7 & 7\\ 7 & 7 & 7 \end{bmatrix}\end{align*}

Two matrices of the same order can be subtracted by subtracting the entries in the corresponding positions.

\begin{align*}\begin{bmatrix} 10 & 9 & 8\\ 7 & 6 & 5 \end{bmatrix}-\begin{bmatrix} 2 & 2 & 2\\ 2 & 2 & 2 \end{bmatrix}=\begin{bmatrix} 8 & 7 & 6\\ 5 & 4 & 3 \end{bmatrix}\end{align*}

#### Multiplication

You can find the product of matrix \begin{align*}A\end{align*} and matrix \begin{align*}B\end{align*} if the number of columns in matrix \begin{align*}A\end{align*} matches the number of rows in matrix \begin{align*}B\end{align*}.  Another way to remember this is when you write the orders of matrix \begin{align*}A\end{align*} and matrix \begin{align*}B\end{align*} next to each other they must be connected by the same number.  The resulting matrix has the number of rows from the first matrix and the number of columns from the second matrix.

\begin{align*}(2 \times 3) \cdot (3 \times 5)=(2 \times 5)\end{align*}

To compute the first entry of the resulting \begin{align*}2 \times 5\end{align*} matrix you should match the first row from the first matrix and the first column of the second matrix.  The arithmetic operation to combine these numbers is identical to taking the dot product between two vectors.

• The entry in the first row first column of the new matrix is computed as \begin{align*}1 \cdot 0+4 \cdot 2 +3 \cdot 1=11\end{align*}.
• The entry in the second row first column of the new matrix is computed as \begin{align*}5 \cdot 0 + 6 \cdot 2+9 \cdot 1=21\end{align*}.
• The entry in the first row second column of the new matrix is computed as \begin{align*}1\cdot 1+4\cdot 0 + 3\cdot 1 = 4\end{align*}
• The entry in the second row second column of the new matrix is computed as \begin{align*}5\cdot 1 + 6\cdot0 + 9\cdot 1 = 14\end{align*}

Continue this pattern and you will find that the solution to this multiplication is:
\begin{align*}C &= \begin{bmatrix} 11 & 4 & 12 & 9 & 7\\ 21 & 14 & 42 & 17 & 15 \end{bmatrix}\\\end{align*}

#### Other Properties of Matrix Algebra

• Commutativity holds for matrix addition. This means that when matrices \begin{align*}A\end{align*} and \begin{align*}B\end{align*} can be added (when they have matching orders), then: \begin{align*}A+B=B+A\end{align*}
• Commutativity does not hold in general for matrix multiplication.
• Associativity holds for both multiplication and addition. \begin{align*}(AB)C=A(BC), (A+B)+C=A+(B+C)\end{align*}
• Distribution over addition and subtraction holds. \begin{align*}A(B \pm C)=AB \pm AC\end{align*}

### Examples

#### Example 1

Earlier, you were asked what the differences between matrix and regular algebra are. The main difference between matrix algebra and regular algebra with numbers is that matrices do not have the commutative property for multiplication.  There are other complexities that matrices have, but many of them stem from the fact that for most matrices \begin{align*}AB \neq BA\end{align*}

#### Example 2

Show the commutative property does not hold by demonstrating \begin{align*}AB \neq BA\end{align*}

\begin{align*}A=\begin{bmatrix} 0 & -1 & 8\\ 1 & 2 & 0\\ 4 & 3 & 12 \end{bmatrix}, \quad B=\begin{bmatrix} 1 & 5 & 1\\ 2 & 2 & 1\\ 4 & 3 & 0 \end{bmatrix}\end{align*}

\begin{align*}AB &= \begin{bmatrix} 30 & 22 & -1\\ 5 & 9 & 3\\ 58 & 62 & 7 \end{bmatrix}\\ BA &= \begin{bmatrix} 9 & 12 & 20\\ 6 & 5 & 28\\ 3 & 2 & 32 \end{bmatrix}\end{align*}

#### Example 3

Compute the following matrix arithmetic: \begin{align*}10 \cdot (2A-3C) \cdot B\end{align*}.

\begin{align*}A=\begin{bmatrix} 1 & 2\\ 4 & 5 \end{bmatrix}, B=\begin{bmatrix} 0 & 1 & 2\\ 4 & 3 & 2 \end{bmatrix}, C=\begin{bmatrix} 12 & 0\\ 1 & 3 \end{bmatrix}\end{align*}

When a matrix is multiplied by a scalar (such as with \begin{align*}2A\end{align*}), multiply each entry in the matrix by the scalar.

\begin{align*}2A &= \begin{bmatrix} 2 & 4\\ 8 & 10 \end{bmatrix}\\ -3C &= \begin{bmatrix} -36 & 0\\ -3 & -9 \end{bmatrix}\\ 2A-3C &= \begin{bmatrix} -34 & 4\\ 5 & 1 \end{bmatrix}\end{align*}

Since the associative property holds, you can either distribute the ten or multiply by matrix \begin{align*}B\end{align*} next.

\begin{align*}(2A-3C) \cdot B &= \begin{bmatrix} 16 & -22 & -60\\ 4 & 8 & 12 \end{bmatrix}\\ 10 \cdot (2A-3C) \cdot B &= \begin{bmatrix} 160 & -220 & -600\\ 40 & 80 & 120 \end{bmatrix}\end{align*}

#### Example 4

Use your calculator to input and compute the following matrix operations.

\begin{align*}& A=\begin{bmatrix} 54 & 65 & 12\\ 235 & 322 & 167\\ 413 & 512 & 123 \end{bmatrix}, \quad B=\begin{bmatrix} 163 & 212 & 466\\ 91 & 221 & 184\\ 42 & 55 & 42 \end{bmatrix}\\ & A^T \cdot B \cdot A - 100A\end{align*}

Most graphing calculators like the TI-84 can do operations on matrices. Find where you can enter matrices and enter the two matrices.

Then type in the appropriate operation and see the result.  The TI-84 has a built in Transpose button.

The actual numbers on this guided practice are less important than the knowledge that your calculator can perform all of the matrix algebra demonstrated in this concept.  It is useful to fully know the capabilities of the tools at your disposal, but it should not replace knowing why the calculator does what it does.

#### Example 5

Matrix multiplication can be used as a transformation in the coordinate system.  Consider the triangle with coordinates (0, 0) (1, 2) and (1, 0) the following matrix:

\begin{align*}\begin{bmatrix} \cos 90^\circ & \sin 90^\circ\\ -\sin 90 & \cos 90 \end{bmatrix}\end{align*}

What does the new picture look like?

The matrix simplifies to become:

\begin{align*}\begin{bmatrix} \cos 90^\circ & \sin 90^\circ\\ -\sin 90 & \cos 90 \end{bmatrix}=\begin{bmatrix} 0 & 1\\ -1 & 0 \end{bmatrix}\end{align*}

When applied to each point as a transformation, a new point is produced. Note that \begin{align*}\begin{bmatrix} x & y \end{bmatrix}\end{align*} is a matrix representing each original point and \begin{align*}\begin{bmatrix} x^\prime & y^\prime \end{bmatrix}\end{align*} is the new point.  The \begin{align*}x^\prime\end{align*} is read as “\begin{align*}x\end{align*} prime” and is a common way to refer to a result after a transformation.

\begin{align*}\begin{bmatrix} x & y \end{bmatrix} \cdot \begin{bmatrix} 0 & 1\\ -1 & 0 \end{bmatrix} &= \begin{bmatrix} x^\prime & y^\prime \end{bmatrix}\\ \begin{bmatrix} 0 & 0 \end{bmatrix} \cdot \begin{bmatrix} 0 & 1\\ -1 & 0 \end{bmatrix} &= \begin{bmatrix} 0 & 0 \end{bmatrix}\\ \begin{bmatrix} 1 & 2 \end{bmatrix} \cdot \begin{bmatrix} 0 & 1\\ -1 & 0 \end{bmatrix} &= \begin{bmatrix} -2 & 1 \end{bmatrix}\\ \begin{bmatrix} 1 & 0 \end{bmatrix} \cdot \begin{bmatrix} 0 & 1\\ -1 & 0 \end{bmatrix} &= \begin{bmatrix} 0 & 1 \end{bmatrix}\end{align*}

Notice how the matrix transformation rotates graphs in a counterclockwise direction \begin{align*}90^\circ\end{align*}.

\begin{align*}\begin{bmatrix} x & y \end{bmatrix} \begin{bmatrix} \cos 90^\circ & \sin 90^\circ\\ -\sin 90 & \cos 90 \end{bmatrix}=\begin{bmatrix} -y & x \end{bmatrix}\end{align*}

The matrix transformation applied in the following order will rotate a graph clockwise \begin{align*}90^\circ\end{align*}.

\begin{align*}\begin{bmatrix} \cos 90^\circ & \sin 90^\circ\\ -\sin 90 & \cos 90 \end{bmatrix} \begin{bmatrix} x\\ y \end{bmatrix}=\begin{bmatrix} y\\ -x \end{bmatrix}\end{align*}

### Review

\begin{align*}A=\begin{bmatrix} 2 & 7\\ 3 & 8 \end{bmatrix}, B=\begin{bmatrix} 0 & 5 & 1\\ 3 & 4 & 6 \end{bmatrix}, C=\begin{bmatrix} 14 & 6\\ 1 & 2 \end{bmatrix}, D=\begin{bmatrix} 5 & 0\\ 1 & 2 \end{bmatrix}\end{align*}

1. Find \begin{align*}AC\end{align*}. If not possible, explain.

2. Find \begin{align*}BA\end{align*}. If not possible, explain.

3. Find \begin{align*}CA\end{align*}. If not possible, explain.

4. Find \begin{align*}4B^T\end{align*}. If not possible, explain.

5. Find \begin{align*}A+C\end{align*}. If not possible, explain.

6. Find \begin{align*}D-A\end{align*}. If not possible, explain.

7. Find \begin{align*}2(A+C-D)\end{align*}. If not possible, explain.

8. Find \begin{align*}(A+C)B\end{align*}. If not possible, explain.

9. Find \begin{align*}B(A+C)\end{align*}. If not possible, explain.

10. Show that \begin{align*}A(C+D)=AC+AD\end{align*}.

11. Show that \begin{align*}A(C-D)=AC-AD\end{align*}.

Practice using your calculator for #12-#15.

\begin{align*}E=\begin{bmatrix} 312 & 59 & 34\\ 342 & 156 & 189\\ 783 & 23 & 133 \end{bmatrix}, F=\begin{bmatrix} 33 & 72 & 21\\ 93 & 41 & 94\\ 62 & 75 & 72 \end{bmatrix}, G=\begin{bmatrix} 11 & 735 & 67\\ 93 & 456 & 2\\ 94 & 34 & 0 \end{bmatrix}\end{align*}

12. Find \begin{align*}E+F+G\end{align*}.

13. Find \begin{align*}2E\end{align*}.

14. Find \begin{align*}4F\end{align*}.

15. Find \begin{align*}(E+F)G\end{align*}.

To see the Review answers, open this PDF file and look for section 8.4.

### Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes

### Vocabulary Language: English

TermDefinition
Matrices Matrices are rectangular arrangements of data elements presented in rows and columns.
Matrix A matrix is a rectangular arrangement of data elements presented in rows and columns.
matrix operations The primary matrix operations are addition, subtraction and multiplication.
order The order of a matrix describes the number of rows and the number of columns in the matrix.

### Explore More

Sign in to explore more, including practice questions and solutions for Matrix Algebra.