Subsection 2.2.1 Addition and Transposition
Investigation 2.2.1.
Finish the following sentences.
(a)
Vectors are equal if…
(b)
Matrices are equal if…
(c)
A scalar is…
Just as you can add two vectors in \(\mathbb{R}^n\) componentwise, you can add two matrices entry-wise. For this reason, it only makes sense to add two matrices if they are the same size. You can also define scalar multiplication of a matrix entry-wise.
Investigation 2.2.2.
Let \(A=\begin{bmatrix} 3\amp -1\amp 0 \\2\amp 0\amp -7 \\ 4\amp 2\amp 6 \end{bmatrix}\text{,}\) \(B=\begin{bmatrix} 6\amp -2\amp 0 \\3\amp 0\amp -21 \\ 4\amp 2\amp 6 \end{bmatrix}\text{,}\) and \(C=\begin{bmatrix} 1\amp 0\amp 0 \\0\amp 1\amp 0\\1\amp 1\amp 1 \end{bmatrix}\text{.}\)
(a)
Is \(B\) a scalar multiple of \(A\text{?}\) Why or why not?
(b)
\(2A-3C=\)
(c)
\(-(A+C)+2B=\)
(d)
\((84A+16B-12C)_{2,1}=\)
Investigation 2.2.3.
Symbolically, \((A+B)_{i,j}=\fillinmath{XXXXXXXXXX}\) and \((k A)_{i,j}=\fillinmath{XXXXXXXXXX}\)
Definition 2.2.1.
Let \(A\) be a \(m\) by \(n\) matrix. The transpose of \(A\text{,}\) denoted \(A^T\text{,}\) is a \(n\) by \(m\) matrix such that \((A^T)_{ij}= (A)_{ji}\text{.}\)
There are a couple of ways to think about the transpose. First, you can think about flipping the matrix across the main diagonal (the elements of the form \(A_{i,i}\)). You can also view the transpose of a matrix as switching the rows and columns (but preserving the order). In other words, the \(i\)-th row of \(A^T\) is the \(i\)-th column of \(A\text{.}\)
Investigation 2.2.4.
Let \(A=\begin{bmatrix} 3\amp -1 \\2\amp 0 \\ 4\amp 2 \end{bmatrix}\) and \(B=\begin{bmatrix} 6\amp -2\amp 0 \\3\amp 0\amp -21 \end{bmatrix}\)
(a)
\(A^T=\)
(b)
\(B^T=\)
(c)
\(A^T+B=\)
(d)
\(B^T+A=\)
Investigation 2.2.5.
Let \(A=\begin{bmatrix} 3\amp -1\amp 0 \\2\amp 0\amp -7 \\ 4\amp 2\amp 6 \end{bmatrix}\text{,}\) \(B=\begin{bmatrix} 6\amp -2\amp 0 \\3\amp 0\amp -21 \\ 4\amp 2\amp 6 \end{bmatrix}\text{,}\) and \(C=\begin{bmatrix} 1\amp 0\amp 0 \\0\amp 1\amp 0\\1\amp 1\amp 1 \end{bmatrix}\text{.}\)
(a)
\(A+B^T=\)
(b)
\(((C-B)^T+A)^T=\)
Theorem 2.2.2.
If \(A\) and \(B\) are \(m\) by \(n\) matrices, then \((A+B)^T=A^T+B^T\text{.}\)
Investigation 2.2.6.
What dimensions should \(A\) have in order to be able to add \(A\) to \(A^T\text{?}\)
Theorem 2.2.3.
For all matrices \(A\text{,}\) \((A^T)^T=A\text{.}\)
A matrix \(A\) is symmetric if \(A^T=A\text{.}\)
Theorem 2.2.4.
The sum of two symmetric \(m\) by \(n\) matrices is symmetric.
Theorem 2.2.5.
If \(A\) is a symmetric matrix, then \(kA\) is symmetric.
Subsection 2.2.2 Matrix Multiplication
Earlier we saw how to multiply a \(m\) by \(n\) matrix by a vector from \(\mathbb{R}^n\text{.}\) We will discuss how to define matrix multiplication with multiple interpretations.
Let \(A\) be an \(m\) by \(n\) matrix and let \(\vec{x_1}\) and \(\vec{x_2}\) be vectors from \(\mathbb{R}^n\text{.}\) Earlier we defined what \(A\vec{x_1}\) and \(A\vec{x_2}\) meant. If we build a \(n\) by \(2\) matrix \(B\) using \(\vec{x_1}\) and \(\vec{x_2}\) as the columns, then we can define \(AB\text{,}\) read as “\(A\) times \(B\)”, to be
\begin{equation*}
AB=A [\vec{x_1} \quad \vec{x_2}]=[A\vec{x_1} \quad A\vec{x_2}]
\end{equation*}
The above definition is just distributing our matrix-vector product across the columns of \(B\text{.}\) In a similar fashion, given any \(n\) by \(k\) matrix
\begin{equation*}
B=[\vec{b_1} \quad \vec{b_2} \quad \cdots \quad \vec{b_k}]
\end{equation*}
where \(\vec{b_i}\) is the \(i\)-th column of \(B\text{,}\) we can define
\begin{equation*}
AB=[A\vec{b_1} \quad A\vec{b_2} \quad \cdots \quad A\vec{b_k}]
\end{equation*}
In particular, this means that if \(AB\) makes sense, then we can calculate just the \(i\)-th column of \(AB\) without calculating all of \(AB\text{.}\) Namely, the \(i\)-th column of \(AB\) is \(A \enspace column_i(B)\text{,}\) which is written symbolically as \(column_i(AB)=A \enspace column_i(B)\text{.}\)
Activity 2.2.7.
Let \(A=\begin{bmatrix} 3\amp -1\amp 0 \\2\amp 0\amp -7 \\ 4\amp 2\amp 6 \end{bmatrix}\) and \(B=\begin{bmatrix} 6\amp -2\amp 0 \\3\amp 0\amp -21 \\ 4\amp 2\amp 6 \end{bmatrix}\text{.}\)
(a)
Write out the columns of \(B\) as vectors where \(B=[ \vec{x}_1 \vec{x}_2] \vec{x}_3 ]\text{.}\)
(b)
Compute the following: \(A \vec{x}_1\) \(A \vec{x}_2\) \(A \vec{x}_3\)
(c)
Use the results of your previous work to compute \(AB\)
(d)
Take a moment to look back on exactly what calculation you had to do to get the value of \((AB)_{2,3}\text{.}\) Write out exactly which parts of \(A\) and \(B\) are used in your calculation.
Formally, we can define the product of a \(m\) by \(n\) matrix \(A\) with a \(n\) by \(k\) matrix \(B\) to be the \(m\) by \(k\) matrix \(AB\) such that
\begin{equation*}
(AB)_{i,j}=\sum_{l=1}^n (A)_{i,l}(B)_{l,j}
\end{equation*}
This formula looks difficult, but what it really tells us is that the \((i,j)\) entry of \(AB\) is really the dot product of the \(i\)-th row of \(A\) with the \(j\)-th column of \(B\text{.}\) Remember the dot product of \(\vec{v} =\colvec{v_1\\ v_2\\ \vdots\\ v_n} \in \mathbb{R}^n\) and \(\vec{w} =\colvec{w_1\\ w_2\\ \vdots\\ w_n} \in \mathbb{R}^n\) is just the sum of the products of the components. Namely,
\begin{equation*}
\vec{v} \cdot \vec{w} =\sum_{i=1}^n v_i w_i
\end{equation*}
This idea lets us calculate the matrix product \(AB\) one entry at a time. Continuing this idea will lead us to see that the \(i\)-th row of the product \(AB\) can be calculated as \(row_i(AB)=row_i(A) B\text{.}\)
Note that in general \(AB \neq BA\text{,}\) even when both products make sense.
Investigation 2.2.8.
(a)
What sizes of matrices can you add to a \(m\) by \(n\) matrix?
(b)
What sizes of matrices can you multiply on the right of a \(m\) by \(n\) matrix?
(c)
What sizes of matrices can you multiply on the left of a \(m\) by \(n\) matrix?
Investigation 2.2.9.
If \(A\in M_{m \times n}\text{,}\) when does it make sense to multiply by \(A^T\text{?}\)
Investigation 2.2.10.
Let \(A=\begin{bmatrix} 3\amp 1\\-1\amp 2 \end{bmatrix}\) and \(B=\begin{bmatrix} -1\amp 2\amp 3\\1\amp 0\amp-2 \end{bmatrix}\text{.}\)
(a)
What is the size of \(AB\text{?}\)
(b)
Compute just the first column of \(AB\text{.}\)
(c)
Write the first column of \(AB\) as a linear combination of the columns of A. Be sure to check your work.
(d)
Solve the matrix equation \(A\vec{x} = \colvec{-2\\ 3}\text{.}\)
(e)
Compute just the second row of \(AB\)
Investigation 2.2.11.
Let \(A=\begin{bmatrix} 3\amp 2\amp 1\amp 5\amp 6\\4\amp 1\amp 3\amp 2\amp -1\\0\amp 2\amp 5\amp 6\amp 7\\8\amp 2\amp 3\amp 1\amp 4 \end{bmatrix}\) and \(B=\begin{bmatrix} 5\amp -2\amp 2\amp 4\\6\amp 2\amp 3\amp 6\\4\amp -1\amp 7\amp 14\\2\amp 0\amp -2\amp -4\\1\amp 1\amp 2\amp 4 \end{bmatrix}\)
(a)
\(A_{2,3}=\)
(b)
\(B_{1,4}=\)
(c)
\((AB)_{2,3}=\)
(d)
\(row_2 (AB)=\)
(e)
\(column_3 (AB)=\)
Investigation 2.2.12.
Let \(A=\begin{bmatrix} 3\amp 1\\-1\amp 2 \end{bmatrix}\) and \(B=\begin{bmatrix} -1\amp 2\amp 3\\1\amp 0\amp -2 \end{bmatrix}\text{.}\) Compute \(AB\) and \(BA\text{.}\)
Investigation 2.2.13.
Let \(A=\begin{bmatrix} 3\amp 1\\-1\amp 2 \\-2 \amp 0 \end{bmatrix}\) and \(B=\begin{bmatrix} -1\amp 2\amp 3\\1\amp 0\amp -2 \end{bmatrix}\text{.}\) Compute \(AB\) and \(BA\text{.}\)
You can approach proving the following theorem by showing matrix equality entry-wise or column-wise or row-wise.
Theorem 2.2.6.
For all matrices \(A\text{,}\) \(B\text{,}\) and \(C\) such that the addition and multiplication of matrices below makes sense,
\begin{equation*}
(A+B)C=AC+BC\text{.}
\end{equation*}
Investigation 2.2.14.
Give 2 different examples of 3 by 3 matrices \(A\) and \(B\) such that \(AB=BA\text{.}\)
Investigation 2.2.15.
Give 2 different examples of 3 by 3 matrices \(A\) and \(B\) such that \(AB \neq BA\text{.}\)
Theorem 2.2.7.
For all matrices \(A,B\) such that \(AB\) is defined, \((AB)^T=B^T A^T\text{.}\)
Subsection 2.2.3 Special Types of Matrices
A square matrix is a matrix that has the same number of rows and columns. A \(m\) by \(n\) matrix \(A\) is said to be upper triangular if \(A_{i,j}=0\) whenever \(i \gt j\text{.}\) Similarly, a matrix \(A\) is lower triangular if \(A_{i,j}=0\) whenever \(i\lt j\text{.}\) We usually consider square matrices when we talk about upper or lower triangular, but it may be helpful to consider non-square cases.
Investigation 2.2.16.
Give an example of a matrix that is upper triangular but is not in echelon form. If one does not exist, explain why.
Investigation 2.2.17.
Give an example of a matrix that is in echelon form but is not upper triangular. If one does not exist, explain why.
Investigation 2.2.18.
Can a matrix be upper and lower triangular? Either give an example or explain why there cannot exist one.
Diagonal matrices are matrices whose only nonzero entries are on the diagonal. Specifically, a matrix \(A\) is diagonal if \(A_{i,j}=0\) whenever \(i \neq j\text{.}\)
Investigation 2.2.19.
Give an example of a matrix that is diagonal but not in echelon form.
The \(n\) by \(n\) identity matrix, denoted \(Id_n\text{,}\) is the unique matrix such that \(Id_n \vec{x}= \vec{x}\) for every \(\vec{x} \in \mathbb{R}^n\text{.}\) In fact the entries of \(Id_n\) are easily computed in terms of the Dirac delta function. Specifically \((Id_n)_{i,j}=\delta_{i,j}\text{,}\) where
\begin{equation*}
\delta_{i,j}=\left\{ \begin{array}{cc} 0 \amp \mbox{if }i\neq j\\ 1 \amp \mbox{if } i = j \end{array} \right.
\end{equation*}
Investigation 2.2.20.
Write out \(Id_5\) and use it to prove that for any \(\vec{v} \in \mathbb{R}^5\) the product of \(Id_5\) and \(\vec{v}\) will always be \(\vec{v}\text{.}\)
Investigation 2.2.21. Superstar Bonus Question.
Prove that \(Id_5\) is the only matrix that has the property from the problem above.