Section 4.2 Operations on matrices
In this section we will see some fundamental ways of combining linear transformations to make other linear transformations. As we saw in the previous section, linear transformations are fundamentally related to matrices, so we will also see how the operations we introduce act on matrices.
Subsection 4.2.1 Addition
Definition 4.2.1.
Suppose that \(T : \mathbb{R}^n \to \mathbb{R}^m\) and \(S : \mathbb{R}^n \to \mathbb{R}^m\) are linear transformations. We define their sum to be the function \(T+S : \mathbb{R}^n \to \mathbb{R}^m\) defined by
Example 4.2.2.
Let \(T : \mathbb{R}^2 \to \mathbb{R}^3\) be defined by \(T\left(\begin{bmatrix}x\\y\end{bmatrix}\right) = \begin{bmatrix}x+y\\x-y\\2y\end{bmatrix}\) and let \(S : \mathbb{R}^2 \to \mathbb{R}^3\) be defined by \(S\left(\begin{bmatrix}x\\y\end{bmatrix}\right) = \begin{bmatrix}y\\x\\2x+y\end{bmatrix}\text{.}\) Then
Note 4.2.3.
We can only add two linear transformations if they have the same domain (that is, they take inputs from the same dimension as each other) and the same codomain (that is, they give their outputs in the same dimension as each other). For instance, if \(T : \mathbb{R}^2 \to \mathbb{R}^3\) and \(S : \mathbb{R}^3 \to \mathbb{R}^3\) are linear transformations then \(T+S\) does not make sense.
Theorem 4.2.4.
Suppose that \(T : \mathbb{R}^n \to \mathbb{R}^m\) and \(S : \mathbb{R}^n \to \mathbb{R}^m\) are linear transformations. Then \((T+S) : \mathbb{R}^n \to \mathbb{R}^m\) is also a linear transformation.
Proof.
Suppose that \(\vec{v}, \vec{w}\) are vectors in \(\mathbb{R}^n\text{,}\) and \(c\) is a scalar. Then:
and
On the side of matrices, we define addition in the most natural way.
Definition 4.2.5.
Suppose that \(A\) and \(B\) are \(m \times n\)matrices. Their sum is the \(m \times n\) matrix \(A+B\text{,}\) defined by saying that for every \(i\) and \(j\text{,}\) the \((i, j)\) entry of \(A+B\) is the \((i,j)\) entry of \(A\) plus the \((i,j)\) entry of \(B\text{.}\)
Example 4.2.6.
If \(A = \begin{bmatrix}1 \amp 2 \amp 3 \\ -2 \amp 0 \amp 1\end{bmatrix}\) and \(B = \begin{bmatrix}0 \amp 1 \amp -1 \\ 4 \amp 1 \amp 0\end{bmatrix}\) then \(A+B = \begin{bmatrix}1 \amp 3 \amp 2 \\ 2 \amp 1 \amp 1\end{bmatrix}\text{.}\)
Note 4.2.7.
We can only add two matrices of the same size. For instance, the expression \(\matr{cc}{1 \amp 2 \\ 3 \amp 4} + \matr{ccc}{1 \amp 2 \amp 3 \\ 2 \amp 4 \amp 5}\) simply does not make sense.
As you probably expect, our definitions of addition of linear transformations and of matrices were designed to interact nicely.
Theorem 4.2.8.
Suppose that \(T : \mathbb{R}^n \to \mathbb{R}^m\) and \(S : \mathbb{R}^n \to \mathbb{R}^m\) are linear transformations. Then \([T+S] = [T] + [S]\text{.}\)
Proof.
The first column of \([T+S]\) is \((T+S)(\vec{e_1})\text{,}\) and \((T+S)(\vec{e_1}) = T(\vec{e_1}) + S(\vec{e_1})\text{,}\) which is the sum of the first column of \([T]\) and the first column of \([S]\text{.}\) Thus \([T+S]\) and \([T]+[S]\) have the same first column. Repeating this for the other columns, using the other \(\vec{e_k}\)s instead of \(\vec{e_1}\text{,}\) shows that \([T+S]\) and \([T]+[S]\) have exactly the same columns, so \([T+S] = [T] + [S]\text{.}\)
Example 4.2.9.
Consider again the transformations \(T : \mathbb{R}^2 \to \mathbb{R}^3\) defined by \(T\left(\begin{bmatrix}x\\y\end{bmatrix}\right) = \begin{bmatrix}x+y\\x-y\\2y\end{bmatrix}\) and \(S : \mathbb{R}^2 \to \mathbb{R}^3\) defined by \(S\left(\begin{bmatrix}x\\y\end{bmatrix}\right) = \begin{bmatrix}y\\x\\2x+y\end{bmatrix}\text{.}\) We saw in Example 4.2.2 that \((T+S) : \mathbb{R}^2 \to \mathbb{R}^3\) is given by \((T+S)\left(\begin{bmatrix}x\\y\end{bmatrix}\right) = \begin{bmatrix}x+2y \\ 2x-y \\ 2x+3y\end{bmatrix}\text{.}\) Plugging in \(\vec{e_1}\) and \(\vec{e_2}\text{,}\) we find that
On the other hand, we can also calculate \([T] = \begin{bmatrix}1 \amp 1 \\ 1 \amp -1 \\ 0 \amp 2\end{bmatrix}\) and \([S] = \begin{bmatrix}0 \amp 1 \\ 1 \amp 0 \\ 2 \amp 1\end{bmatrix}\text{,}\) and then calculate
as we expected.
Definition 4.2.10.
For any \(m\) and \(n\text{,}\) the \(m \times n\) zero matrix is the \(m \times n\) matrix \(0_{m\times n}\) where every entry is \(0\text{.}\)
Subsection 4.2.2 Scalar multiplication
Definition 4.2.11.
Let \(T : \mathbb{R}^n \to \mathbb{R}^m\) be a linear transformation, and let \(c\) be a scalar. We define a new linear transformation \(cT : \mathbb{R}^n \to \mathbb{R}^m\) by
Example 4.2.12.
Let \(T : \mathbb{R}^4 \to \mathbb{R}^2\) be defined by \(T\left(\begin{bmatrix}x\\y\\z\\w\end{bmatrix}\right) = \begin{bmatrix}x+y-2w\\z+w\end{bmatrix}\text{.}\) Then \((-3)T : \mathbb{R}^4 \to \mathbb{R}^2\) is defined by
Theorem 4.2.13.
Suppose that \(T : \mathbb{R}^n \to \mathbb{R}^m\) is a linear transformation, and \(c\) is a scalar. Then \(cT : \mathbb{R}^n \to \mathbb{R}^m\) is also a linear transformation.
Proof.
This is left as an exercise; it is similar in spirit to the proof of Theorem 4.2.4.
On the side of matrices, we have:
Definition 4.2.14.
Let \(A\) be an \(m \times n\) matrix, and let \(c\) be a scalar. We define the \(m \times n\) matrix \(cA\) by multiplying every entry of \(A\) by \(c\text{.}\)
Example 4.2.15.
If \(A = \begin{bmatrix}1 \amp 2 \amp 3 \\ 4 \amp 5 \amp 6\end{bmatrix}\) then \(5A = \begin{bmatrix}5 \amp 10 \amp 15 \\ 20 \amp 25 \amp 30\end{bmatrix}\text{.}\)
Like with addition, the linear transformations viewpoint and the matrix viewpoint play nicely together:
Theorem 4.2.16.
Suppose that \(T : \mathbb{R}^n \to \mathbb{R}^m\) is a linear transformation, and \(c\) is a scalar. Then \([cT] = c[T]\text{.}\)
Proof.
Exercise; similar to the proof of Theorem 4.2.8.
Example 4.2.17.
Consider again the transformation \(T : \mathbb{R}^4 \to \mathbb{R}^2\) defined by \(T\left(\begin{bmatrix}x\\y\\z\\w\end{bmatrix}\right) = \begin{bmatrix}x+y-2w\\z+w\end{bmatrix}\text{.}\) We saw in Example 4.2.12 that
A direct calculation using Definition 4.1.8 shows that \([T] = \begin{bmatrix}1 \amp 1 \amp 0 \amp -2 \\ 0 \amp 0 \amp 1 \amp 1\end{bmatrix}\text{,}\) and that
As we did with vectors (and also with numbers), we will often write \(A - B\) instead of \(A + (-1)B\text{.}\)
Subsection 4.2.3 Transpose
Our last basic operation is a bit harder to motivate than addition and scalar multiplication, but we will see in Chapter 6 that is is very important. For this particular operation the definition in terms of linear transformations is outside the scope of this course, so we restrict ourselves to matrices.
Definition 4.2.18.
Suppose that \(A\) is an \(m \times n\) matrix. The transpose of \(A\) is the \(n \times m\) matrix obtained by writing the columns of \(A\) as rows.
A matrix \(A\) is called symmetric if \(A = A^t\text{.}\)
Example 4.2.19.
Let \(A = \begin{bmatrix}1 \amp 2 \amp 3 \\ 3 \amp 4 \amp 0\end{bmatrix}\text{.}\) Then \(A^t = \begin{bmatrix}1 \amp 3 \\ 2 \amp 4 \\ 3 \amp 0\end{bmatrix}\text{.}\)
Theorem 4.2.20.
Let \(A\) be a symmetric matrix. Then \(A\) is square.
Proof.
If \(A\) is \(m \times n\) then \(A^t\) is \(n \times m\text{,}\) so to have \(A = A^t\) we must have \(m=n\text{,}\) i.e., that \(A\) is square.
Note 4.2.21.
Be careful! Theorem 4.2.20 says that every symmetric matrix is square. It does not say that every square matrix is symmetric. For example, \(\begin{bmatrix}1 \amp 1 \\ 2 \amp 1\end{bmatrix}\) is a square matrix that is not symmetric.
Now that we have several things that we can do to matrices (or linear transformations) it is important to know how these operations interact with each other. Fortunately, the answer is that they interact in exactly the ways that you would hope for, as long as we are careful to make sure that the sizes of the matrices (equivalently, the domains and codomains of the linear transformations) match up correctly. We'll state the relations for matrices, and leave it up to you to translate these statements into the language of linear transformations. We omit the proofs, and invite you to verify these statements yourself.
Theorem 4.2.22.
Let \(A\text{,}\) \(B\text{,}\) and \(C\) be matrices, all of which are the same size \(m \times n\text{,}\) and let \(c\) and \(d\) be scalars. Then:
\(\displaystyle (A+B)+C = A+(B+C)\)
\(\displaystyle A+B=B+A\)
\(\displaystyle A+0_{m\times n} = A\)
\(\displaystyle (c+d)A = cA+dA\)
\(\displaystyle (cd)A = c(dA)\)
\(\displaystyle c(A+B) = cA+cB\)
\(\displaystyle 0A = 0_{m \times n}\)
\(\displaystyle (A+B)^t = A^t + B^t\)
\(\displaystyle (cA)^t = c(A^t)\)
Exercises 4.2.4 Exercises
\(\displaystyle 3A - 2B \) \(\displaystyle 5C \) \(\displaystyle 3E^t \) \(\displaystyle B+D \) \(\displaystyle 4A^t - 3C \) \(\displaystyle (A+C)^t \) \(\displaystyle 2B - 3E \) \(\displaystyle A - D \) \(\displaystyle (B- 2E)^t \)1.
Let \(A = \begin{bmatrix} 2 \amp 1 \\ 0 \amp -1 \end{bmatrix},
B = \begin{bmatrix} 3 \amp -1 \amp 2\\ 0 \amp 1 \amp 4 \end{bmatrix},
C = \begin{bmatrix} 3 \amp -1 \\ 2 \amp 0 \end{bmatrix},
D = \begin{bmatrix} 1 \amp 3 \\ -1 \amp 0 \\ 1 \amp 4 \end{bmatrix},\) and \(E = \begin{bmatrix} 1 \amp 0 \amp 1 \\ 0 \amp 1 \amp 0 \end{bmatrix}.\) Compute the following (where possible).
2.
Find \(A \) in terms of \(B \) if:
- \begin{equation*} A= -\frac{1}{2} B \end{equation*}
- \begin{equation*} A = -\frac{11}{3}B \end{equation*}
- \begin{align*} A + B = 3A + 2B \iff \amp (1-3)A = (2-1)B \\ \iff \amp -2A = B \\ \iff \amp A= -\frac{1}{2} B. \end{align*}
- \begin{align*} 2A - B = 5(A + 2B) \iff \amp 2A - B = 5A + 10B\\ \iff \amp -3A = 11B\\ \iff \amp A = -\frac{11}{3}B. \end{align*}
3.
If \(X, Y, A, \) and \(B \) are matrices of the same size, solve the following systems of equations to obtain \(X \) and \(Y \) in terms of \(A \) and \(B \text{.}\)
- The system can also be written as\begin{equation*} \matr{cc|c}{ 5 \amp 3 \amp A \\ 2 \amp 1 \amp B}, \end{equation*}where it is important that we remember that \(A,B\) are not numbers, so we cannot divide by them. We row-reduce:\begin{align*} \matr{cc|c}{5 \amp 3 \amp A \\ 2 \amp 1 \amp B} \underset{5R_{2}}{\overset{2R_{1}}{\longrightarrow}} \amp \matr{cc|c}{10 \amp 6 \amp 2A \\ 10 \amp 5 \amp 5B} \overset{-R_{1}+R_{2}}{\longrightarrow} \matr{cc|c}{10 \amp 6 \amp 2A \\ 0 \amp -1 \amp 5B-2A}\\ \overset{6R_{2}+R_{1}}{\longrightarrow} \amp \matr{cc|c}{10 \amp 0 \amp 2A + 6 (5B-2A) \\ 0 \amp -1 \amp 5B-2A}\\ \amp= \matr{cc|c}{10 \amp 0 \amp -10A + 30 B \\ 0 \amp -1 \amp 5B-2A}. \end{align*}We conclude that \(X= \frac{1}{10} (-10A + 30 B) = -A + 3 B\) and \(Y=-5B+2A\text{.}\)
- The system can also be written as\begin{equation*} \matr{cc|c}{ 4 \amp 3 \amp A \\ 5 \amp 4 \amp B}, \end{equation*}where it is important that we remember that \(A,B\) are not numbers, so we cannot divide by them. We row-reduce:\begin{align*} \matr{cc|c}{ 4 \amp 3 \amp A \\ 5 \amp 4 \amp B} \overset{5R_{1}}{\underset{4R_{2}}{\longrightarrow}} \amp\matr{cc|c}{ 20 \amp 15 \amp 5A \\ 20 \amp 16 \amp 4B} \overset{-R_{1}+R_{2}}{\longrightarrow} \matr{cc|c}{ 20 \amp 15 \amp 5A \\ 0 \amp 1 \amp 4B-5A}\\ \overset{-15R_{2}+R_{1}}{\longrightarrow} \amp\matr{cc|c}{ 20 \amp 0 \amp 5A-15(4B-5A) \\ 0 \amp 1 \amp 4B-5A}\\ \amp=\matr{cc|c}{ 20 \amp 0 \amp 80A-60B \\ 0 \amp 1 \amp 4B-5A} \end{align*}We conclude that \(X= \frac{1}{20} (80A-60B) = 4A - 3 B\) and \(Y=4B-5A\text{.}\)
If \(A \) and \(B \) are symmetric, then so is \(A - B \text{.}\) If \(A\) is symmetric, then so is \(kA \) for any scalar \(k \text{.}\) Let \(A=[a_{ij}]\text{.}\) By definition of scalar multiplication, \(kA=[ka_{ij}]\text{.}\) By definition of the transpose, the \((i,j)\)-entry of \((kA)^{T}\) is therefore \(ka_{ji}\) (where we swapped the roles of \(i\) and \(j\)). Since \(A\) is symmetric, we know that \(a_{ij}=a_{ji}\) for any choice of \(i,j\text{,}\) so in particular \(ka_{ij}=ka_{ji}\) also. This means that the \((i,j)\)-entry of \(kA\) (namely \(ka_{ij}\)) coincides with the \((i,j)\)-entry of \((kA)^{T}\) (namely \(ka_{ji}\)), which shows that \(k A = (kA)^{T} \) since they are equal entrywise.4.
Let \(A \) and \(B \) be square matrices of the same size. Prove each of the following:
5.
A square matrix is called skew-symmetric if \(A^t = -A \text{.}\) Show that the main diagonal of a skew-symmetric matrix consists of only zeros.
6.
Show that \(A + A^t \) is symmetric for any square matrix \(A \text{.}\)