Did you know that matrices are used in nearly every branch of mathematics?
And our ability to solve and analyze linear systems of equations is greatly enhanced when we can perform algebraic operations with matrices.
What type of operations?
Addition, subtraction, multiplication of matrices, the transpose and trace, as well as how to calculate the determinant of a matrix.
Understanding Special Matrices
But before we can jump into the basic matrix operations, we need to review some special matrices: square matrix, row matrix, column matrix, zero matrix, and identity matrix, as they will be required in understanding some critical matrix properties.
A square matrix is an \(n \times n\) matrix where the number of rows equals the number of columns. A row matrix is a \(1 \times n\) matrix such that there is only one row with \(\mathrm{n}\) columns. A column matrix is a \(n \times 1\) array with \(\mathrm{n}\) rows and only one column. A matrix containing only zero elements is called a zero matrix, denoted \(\overrightarrow{0}\). And the identity matrix is a square matrix such that the elements along the main diagonal are all \(1 \mathrm{~s}\) and the rest are \(0 \mathrm{~s}\).
Basic Matrix Operations
Alright, now let’s jump into those fundamental operations.
Throughout our work with matrices so far, we know that we can multiply a matrix by a scalar (number), similar to how we apply the distributive property with parentheses. While the matrix size is not vital for scalar multiplication, it is critical for adding and subtracting matrices.
To add or subtract two matrices, we add or subtract the corresponding element. But there is a warning-only matrices of the same size can be added or subtracted. It is also important to note that when subtracting matrices, what we are really doing is adding the opposite.
\begin{align*}
A-B=A+(-B)
\end{align*}
Here’s the updated section with the equations formatted according to your specified format, broken up for better display on a narrow page:
For example, let’s find the scalar multiplication, sum, or difference for the following matrices.
\begin{aligned}
3\left[\begin{array}{cc}5 & -6 \\ 8 & 9\end{array}\right] & =\left[\begin{array}{cc}3 \cdot 5 & 3 \cdot(-6) \\ 3 \cdot 8 & 3 \cdot 9\end{array}\right] \\
& =\left[\begin{array}{cc}15 & -18 \\ 24 & 27\end{array}\right]
\end{aligned}
\begin{aligned}
\left[\begin{array}{cc}5 & -6 \\ 8 & 9\end{array}\right]+\left[\begin{array}{cc}-4 & 6 \\ 8 & -3\end{array}\right] & =\left[\begin{array}{cc}5+(-4) & -6+6 \\ 8+8 & 9+(-3)\end{array}\right] \\
& =\left[\begin{array}{cc}1 & 0 \\ 16 & 6\end{array}\right]
\end{aligned}
\begin{aligned}
\left[\begin{array}{cc}5 & -6 \\ 8 & 9\end{array}\right]-\left[\begin{array}{cc}-4 & 6 \\ 8 & -3\end{array}\right] & =\left[\begin{array}{cc}5 & -6 \\ 8 & 9\end{array}\right]+\left[\begin{array}{cc}-(-4) & -(6) \\ -(8) & -(-3)\end{array}\right] \\
& =\left[\begin{array}{cc}5 & -6 \\ 8 & 9\end{array}\right]+\left[\begin{array}{cc}4 & -6 \\ -8 & 3\end{array}\right] \\
& =\left[\begin{array}{cc}9 & -12 \\ 0 & 12\end{array}\right]
\end{aligned}
Easy, right?
And matrix addition satisfies the closure, commutative, associative, identity, and inverse properties from Algebra!
Matrix Multiplication Explained
Alright, now it’s time to talk about matrix multiplication.
If the number of columns of an \(m \times n\) matrix \(\mathrm{A}\) is the same as the number of rows of an \(n \times p\) matrix B, then the product matrix \(A B\) is found as \(a_{i 1} b_{1 j}+a_{i 2} b_{2 j}+\cdots+a_{i n} b_{n j}\) creating an \(m \times p\) matrix.
Huh?
It’s really not so hard.
First, we must determine the dimensions of the product matrix and then multiply row by column.
Here’s the updated section with the equations formatted according to your specified format, broken up for better display on a narrow page:
It’s best to see this rule in action with an example.
Find the product \(AB\) if \(A=\left[\begin{array}{ccc}-3 & 4 & 2 \\ 5 & 0 & 4\end{array}\right]\) and \(B=\left[\begin{array}{cc}-6 & 4 \\ 2 & 3 \\ 3 & -2\end{array}\right]\)
First, we confirm the size of the product matrix:
\begin{aligned}
A & =2 \times 3 \\
B & =3 \times 2 \\
AB & =2 \times 2
\end{aligned}
Then we multiply corresponding elements from the rows of \(A\) and the columns of \(B\) and calculate the sum of the products:
\begin{aligned}
\left[\begin{array}{ccc}-3 & 4 & 2 \\ 5 & 0 & 4\end{array}\right]\left[\begin{array}{cc}-6 & 4 \\ 2 & 3 \\ 3 & -2\end{array}\right] & =\left[\begin{array}{cc}(-3) \cdot(-6)+4 \cdot 2+2 \cdot 3 & (-3) \cdot 4+4 \cdot 3+2 \cdot(-2) \\
5 \cdot(-6)+0 \cdot 2+4 \cdot 3 & 5 \cdot 4+0 \cdot 3+4 \cdot(-2)\end{array}\right] \\
& =\left[\begin{array}{cc}32 & -4 \\ -18 & 12\end{array}\right]
\end{aligned}
Don’t worry! We will work through numerous examples of how to multiply two matrices so you get the hang of it, and we will also look at how to calculate the Powers of a Matrix too.
Now, it is imperative to note that while the associative and distributive properties are satisfied with matrix multiplication, the commutative property is not.
Properties of Matrix Multiplication:
\begin{aligned}
(AB)C & =A(BC) \\
A(B+C) & =AB+AC \\
(B+C)A & =BA+CA
\end{aligned}
Meaning \(AB\) does not guarantee that \(BA\). Order matters!
Transpose and Trace of a Matrix
Okay, so now let’s talk about the transpose of a matrix and the trace of a matrix.
The transpose of a matrix is found by switching its rows and columns. In essence, it is the flipped version of the original matrix and is denoted \(A^{T}\)
If \(A=\left[\begin{array}{cc}5 & 1 \\ 0 & 2 \\ -3 & 4\end{array}\right]\) then
\begin{aligned}
A^{T} & =\left[\begin{array}{ccc}5 & 0 & -3 \\ 1 & 2 & 4\end{array}\right]
\end{aligned}
The transpose of a matrix is essential to understanding inverses, estimating variances, transformations, rank, and so much more. Additionally, if \(A\) and \(B\) are matrices whose sizes are appropriate for the sum and product, then
\begin{aligned}
\left(A^{T}\right)^{T} & =A \\
(A+B)^{T} & =A^{T}+B^{T} \\
(c A)^{T} & =c A^{T}, \text{ for some scalar } c \\
(A B)^{T} & =B^{T} A^{T}
\end{aligned}
The trace of the matrix is the sum of the main diagonal entries of a square matrix. It allows us to weigh and quantify complexity and is used in mapping, eigenvalues, and vector spaces.
Remember, the trace can only be calculated for square matrices!
Determinant of a Matrix
Finally, we will learn about the determinant.
A determinant is a special number that can be calculated from a square matrix, nicely stated by Math is Fun. In fact, every \(n \times n\) matrix \(\mathrm{A}\) is associated with a real number called the determinant of \(\mathrm{A}\), written \(\operatorname{det}(A)\) or \(|A|\), that is used in solving systems of equations, finding angles between vectors, vector cross products in calculus, and many other vector operations.
First, we will learn how to calculate a determinant for a \(2 \times 2\) matrix, using the following formula: If \(A=\left[\begin{array}{ll}a & b \\ c & d\end{array}\right]\) then
\begin{aligned}
\operatorname{det}(A) & =|A| \\
& =a d-b c
\end{aligned}
For example, if \(A=\left[\begin{array}{cc}8 & 6 \\ 4 & -3\end{array}\right]\) then
\begin{aligned}
\operatorname{det}(A) & =|A| \\
& =8 \cdot(-3)-6 \cdot 4 \\
& =-48
\end{aligned}
And in the video lesson, we will discover how to apply this rule for a \(3 \times 3\) matrix, where we will use a technique called Expansion by Minor (Cofactors) and the array of signs.
Knowing how to calculate a determinant of a matrix will be imperative to our understanding of how to solve systems of equations as well as the Invertible Matrix Theorem, which we will learn in a future lesson.
This lesson packs a punch and will set us off for all future lessons dealing with matrix operations.
Let’s jump right in!
Video Tutorial w/ Full Lesson & Detailed Examples
Get access to all the courses and over 450 HD videos with your subscription
Monthly and Yearly Plans Available
Still wondering if CalcWorkshop is right for you?
Take a Tour and find out how a membership can take the struggle out of learning math.