Precalculus by Richard Wright
You make known to me the path of life; you will fill me with joy in your presence, with eternal pleasures at your right hand. Psalms 16:11 NIV
Summary: In this section, you will:
SDA NAD Content Standards (2018): PC.6.4
A digital picture can be described as a matrix of colored pixels. Each element is the position and color of the pixel. If you wanted to enlarge the picture so it would be 4 times bigger, you could multiply the position elements of the photo matrix by 4. Many things in computer programming and graphics are simplified by using matrix operations. The difference is that computer programming names them arrays instead of matrices.
To add or subtract matrices, add or subtract the corresponding elements. Because each element is combined with its corresponding element, the matrices have to be the same size.
In order to add or subtract matrices, they must be the same size.
Add or subtract matrices by adding or subtracting all the corresponding elements.
\(\left[\begin{matrix} 1 & 3 \\ -2 & 4 \end{matrix}\right] + \left[\begin{matrix} -3 & 0 \\ -1 & 2 \end{matrix}\right]\)
Solution
The matrices are the same size, so we can add them. Add the corresponding elements as indicated by the color.
$$ \left[\begin{matrix} \color{blue}{1} & \color{red}{3} \\ \color{green}{-2} & \color{purple}{4} \end{matrix}\right] + \left[\begin{matrix} \color{blue}{-3} & \color{red}{0} \\ \color{green}{-1} & \color{purple}{2} \end{matrix}\right] $$
$$ \left[\begin{matrix} \color{blue}{1 + (-3)} & \color{red}{3 + 0} \\ \color{green}{-2 + (-1)} & \color{purple}{4 + 2} \end{matrix}\right] $$
$$ \left[\begin{matrix} \color{blue}{-2} & \color{red}{3} \\ \color{green}{-3} & \color{purple}{6} \end{matrix}\right] $$
\(\left[\begin{matrix} 1 & 3 \\ -2 & 4 \end{matrix}\right] - \left[\begin{matrix} -3 & 0 \\ -1 & 2 \end{matrix}\right]\)
Solution
The matrices are the same size, so we can subtract them. Subtract the corresponding elements as indicated by the color.
$$ \left[\begin{matrix} \color{blue}{1} & \color{red}{3} \\ \color{green}{-2} & \color{purple}{4} \end{matrix}\right] - \left[\begin{matrix} \color{blue}{-3} & \color{red}{0} \\ \color{green}{-1} & \color{purple}{2} \end{matrix}\right] $$
$$ \left[\begin{matrix} \color{blue}{1 - (-3)} & \color{red}{3 - 0} \\ \color{green}{-2 - (-1)} & \color{purple}{4 - 2} \end{matrix}\right] $$
$$ \left[\begin{matrix} \color{blue}{4} & \color{red}{3} \\ \color{green}{-1} & \color{purple}{2} \end{matrix}\right] $$
Add or subtract.
\(\left[\begin{matrix} 2 & -7 & 1 \\ 0 & 3 & -5 \end{matrix}\right] + \left[\begin{matrix} 0 & -9 & 3 \\ -1 & 8 & 4 \end{matrix}\right]\)
Answer
\(\left[\begin{matrix} 2 & -16 & 4 \\ -1 & 11 & -1 \end{matrix}\right]\)
A scalar is a single number as opposed to a matrix. To multiply a scalar with a matrix, multiply each element by the scalar. This is similar to distributing.
Multiply each element in the matrix by the scalar.
This is similar to distribution.
\(3 \left[\begin{matrix} 3 & -2 & 1 \\ -4 & 5 & -1 \end{matrix}\right]\)
Solution
Multiply the scalar, 3, with each of the elements in the matrix
$$ 3 \left[\begin{matrix} 3 & -2 & 1 \\ -4 & 5 & -1 \end{matrix}\right] $$
$$ \left[\begin{matrix} 3(3) & 3(-2) & 3(1) \\ 3(-4) & 3(5) & 3(-1) \end{matrix}\right] $$
$$ \left[\begin{matrix} 9 & -6 & 3 \\ -12 & 15 & -3 \end{matrix}\right] $$
\(2 \left[\begin{matrix} 1 & 3 \\ -2 & 4 \end{matrix}\right] - 3 \left[\begin{matrix} 0 & -1 \\ 2 & 5 \end{matrix}\right]\)
Solution
Follow the order of operations. Multiplication comes before subtraction.
$$ 2 \left[\begin{matrix} 1 & 3 \\ -2 & 4 \end{matrix}\right] - 3 \left[\begin{matrix} 0 & -1 \\ 2 & 5 \end{matrix}\right] $$
$$ \left[\begin{matrix} 2 & 6 \\ -4 & 8 \end{matrix}\right] - \left[\begin{matrix} 0 & -3 \\ 6 & 15 \end{matrix}\right] $$
Now that the multiplication is done, subtract the matrices.
$$ \left[\begin{matrix} 2-0 & 6-(-3) \\ -4-6 & 8-15 \end{matrix}\right] $$
$$ \left[\begin{matrix} 2 & 9 \\ -10 & -7 \end{matrix}\right] $$
\(\left[\begin{matrix} 2 \\ -4 \end{matrix}\right] + 4 \left[\begin{matrix} -1 \\ 3 \end{matrix}\right]\)
Answer
\(\left[\begin{matrix} -2 \\ 8 \end{matrix}\right]\)
In order to multiply 2 matrices, the number of columns in the first matrix must equal the number of rows in the second matrix. If the orders of the two matrices are written in order, then the two middle numbers must be the same. The two outer numbers give the order of the product.
(3 × 2) · (2 × 4)
Notice the middle numbers, the blue 2's, are the same. The product will be the outside red numbers, 2 × 4. Because of this, order is important in matrix multiplication. It is NOT commutative! A 2 × 3 can be multiplied with a 3 × 1. It is not possible if the order is switched. A 3 × 1 cannot be multiplied by a 2 × 3.
Two matrices can be multiplied if and only if the number of columns in the first matrix is equal to the number of rows in the second matrix.
Matrix multiplication is not commutative.
To multiply two matrices,
\(\left[\begin{matrix} 1 & 3 & -2 \\ 2 & 0 & -1 \end{matrix}\right] \left[\begin{matrix} 4 \\ 0 \\ -3 \end{matrix}\right]\)
Solution
First check to see if the matrices can be multiplied. Are the number of columns in the first matrix equal to the number of rows in the second matrix? Write the orders of the matrices and check to see if the middle numbers are the same.
(2 × 3) · (3 × 1)
The middle numbers are the same, so it is possible to multiply the matrices. The product will be a 2 × 1 matrix, the first and last number from above.
Pick a row in the first matrix and a column in the second matrix such as 1st row, 1st column. Multiply the left and top element, plus, multiply the next element in the row and column, plus, multiply the next element in the row and column, plus, and continue until reaching the end of the row and column. The result goes in the 1st row, 1st column of the product matrix.
$$ \left[\begin{matrix} \color{blue}{1} & \color{blue}{3} & \color{blue}{-2} \\ 2 & 0 & -1 \end{matrix}\right] \left[\begin{matrix} \color{blue}{4} \\ \color{blue}{0} \\ \color{blue}{-3} \end{matrix}\right] $$
$$ \left[\begin{matrix} \color{blue}{1} & \rightarrow & \color{purple}{3} & \rightarrow & \color{red}{-2} \\ 2 & \quad & 0 & \quad & -1 \end{matrix}\right] \left[\begin{matrix} \color{blue}{4} \\ \downarrow \\ \color{purple}{0} \\ \downarrow \\ \color{red}{-3} \end{matrix}\right] = \left[\begin{matrix} \color{blue}{1(4)} + \color{purple}{3(0)} + \color{red}{-2(-3)} \\ \quad \end{matrix}\right] $$
Pick another row in the first matrix and a column in the second matrix. The only other combination in this problem is 2nd row, 1st column. The result will go in the 2nd row, 1st column of the product.
$$ \left[\begin{matrix} 1 & \quad & 3 & \quad & -2 \\ \color{blue}{2} & \rightarrow & \color{purple}{0} & \rightarrow & \color{red}{-1} \end{matrix}\right] \left[\begin{matrix} \color{blue}{4} \\ \downarrow \\ \color{purple}{0} \\ \downarrow \\ \color{red}{-3} \end{matrix}\right] = \left[\begin{matrix} 1(4) + 3(0) + -2(-3) \\ \color{blue}{2(4)} + \color{purple}{0(0)} + \color{red}{-1(-3)} \end{matrix}\right] $$
Simplify the result.
$$ = \left[\begin{matrix} 10 \\ 11 \end{matrix}\right] $$
\(\left[\begin{matrix} 1 & -1 \\ 0 & 2 \end{matrix}\right] \left[\begin{matrix} 5 & 1 & 3 \\ -3 & -2 & 0 \end{matrix}\right]\)
Solution
First check to see if the matrices can be multiplied. Are the number of columns in the first matrix equal to the number of rows in the second matrix. Write the orders of the matrices and check to see if the middle numbers are the same.
(2 × 2) · (2 × 3)
The middle numbers are the same, so it is possible to multiply the matrices. The product will be a 2 × 3 matrix, the first and last number from above.
Pick a row in the first matrix and a column in the second matrix such as 1st row, 1st column. Multiply the left and top element, plus, multiply the next element in the row and column, plus, multiply the next element in the row and column, plus, and continue until reaching the end of the row and column. The result goes in the 1st row, 1st column of the product matrix.
$$ \left[\begin{matrix} \color{blue}{1} & \color{blue}{-1} \\ 0 & 2 \end{matrix}\right] \left[\begin{matrix} \color{blue}{5} & 1 & 3 \\ \color{blue}{-3} & -2 & 0 \end{matrix}\right] $$
$$ \left[\begin{matrix} \color{blue}{1} & \rightarrow & \color{purple}{-1} \\ 0 & \quad & 2 \end{matrix}\right] \left[\begin{matrix} \color{blue}{5} & 1 & 3 \\ \downarrow & \quad & \quad \\ \color{purple}{-3} & -2 & 0 \end{matrix}\right] = \left[\begin{matrix} \color{blue}{1(5)} + \color{purple}{-1(-3)} & \quad & \quad \\ \quad & \quad & \quad \end{matrix}\right] $$
Pick another row in the first matrix and a column in the second matrix. perhaps the 1st row, 2nd column. The result will go in the 1st row, 2nd column of the product.
$$ \left[\begin{matrix} \color{blue}{1} & \rightarrow & \color{purple}{-1} \\ 0 & \quad & 2 \end{matrix}\right] \left[\begin{matrix} 5 & \color{blue}{1} & 3 \\ \quad & \downarrow & \quad \\ -3 & \color{purple}{-2} & 0 \end{matrix}\right] = \left[\begin{matrix} 1(5) + -1(-3) & \color{blue}{1(1)} + \color{purple}{-1(-2)} & \quad \\ \quad & \quad & \quad \end{matrix}\right] $$
Pick another row in the first matrix and a column in the second matrix. perhaps the 1st row, 3rd column. The result will go in the 1st row, 3rd column of the product.
$$ \left[\begin{matrix} \color{blue}{1} & \rightarrow & \color{purple}{-1} \\ 0 & \quad & 2 \end{matrix}\right] \left[\begin{matrix} 5 & 1 & \color{blue}{3} \\ \quad & \quad & \downarrow \\ -3 & -2 & \color{purple}{0} \end{matrix}\right] = \left[\begin{matrix} 1(5) + -1(-3) & 1(1) + -1(-2) & \color{blue}{1(3)} + \color{purple}{-1(0)} \\ \quad & \quad & \quad \end{matrix}\right] $$
Pick another row in the first matrix and a column in the second matrix. perhaps the 2nd row, 1st column. The result will go in the 2nd row, 1st column of the product.
$$ \left[\begin{matrix} 1 & \quad & -1 \\ \color{blue}{0} & \rightarrow & \color{purple}{2} \end{matrix}\right] \left[\begin{matrix} \color{blue}{5} & 1 & 3 \\ \downarrow & \quad & \quad \\ \color{purple}{-3} & -2 & 0 \end{matrix}\right] = \left[\begin{matrix} 1(5) + -1(-3) & 1(1) + -1(-2) & 1(3) + -1(0) \\ \color{blue}{0(5)} + \color{purple}{2(-3)} & \quad & \quad \end{matrix}\right] $$
Pick another row in the first matrix and a column in the second matrix. perhaps the 2nd row, 2nd column. The result will go in the 2nd row, 2nd column of the product.
$$ \left[\begin{matrix} 1 & \quad & -1 \\ \color{blue}{0} & \rightarrow & \color{purple}{2} \end{matrix}\right] \left[\begin{matrix} 5 & \color{blue}{1} & 3 \\ \quad & \downarrow & \quad \\ -3 & \color{purple}{-2} & 0 \end{matrix}\right] = \left[\begin{matrix} 1(5) + -1(-3) & 1(1) + -1(-2) & 1(3) + -1(0) \\ 0(5) + 2(-3) & \color{blue}{0(1)} + \color{purple}{2(-2)} & \quad \end{matrix}\right] $$
Pick another row in the first matrix and a column in the second matrix. perhaps the 2nd row, 3rd column. The result will go in the 2nd row, 3rd column of the product.
$$ \left[\begin{matrix} 1 & \quad & -1 \\ \color{blue}{0} & \rightarrow & \color{purple}{2} \end{matrix}\right] \left[\begin{matrix} 5 & 1 & \color{blue}{3} \\ \quad & \quad & \downarrow \\ -3 & -2 & \color{purple}{0} \end{matrix}\right] = \left[\begin{matrix} 1(5) + -1(-3) & 1(1) + -1(-2) & 1(3) + -1(0) \\ 0(5) + 2(-3) & 0(1) + 2(-2) & \color{blue}{0(3)} + \color{purple}{2(0)} \end{matrix}\right] $$
There are no more combinations of rows and columns, so now simplify the result.
$$ = \left[\begin{matrix} 8 & 3 & 3 \\ -6 & -4 & 0 \end{matrix}\right] $$
Multiply.
\(\left[\begin{matrix} 2 & 5 \end{matrix}\right] \left[\begin{matrix} 1 & -3 \\ 0 & -2 \end{matrix}\right]\)
Answer
[2 −16]
In order to add or subtract matrices, they must be the same size.
Add or subtract matrices by adding or subtracting all the corresponding elements.
Multiply each element in the matrix by the scalar.
This is similar to distribution.
Two matrices can be multiplied if and only if the number of columns in the first matrix is equal to the number of rows in the second matrix.
Matrix multiplication is not commutative.
To multiply two matrices,
Helpful videos about this lesson.