Section 5.1 Matrix Operations
\begin{equation*}
A = \begin{bmatrix}
a_{11} \amp a_{12} \amp \dots \amp a_{1n} \\
a_{21} \amp a_{22} \amp \dots \amp a_{2n} \\
\vdots \amp \vdots \amp \ddots \amp \vdots \\
a_{m1} \amp a_{n2} \amp \dots \amp a_{mn}
\end{bmatrix}
\end{equation*}
The \(j\)th column of \(A\) is the column vector \(\vec{a}_j\text{.}\) Then, the matrix can be written as,
\begin{equation*}
A = \begin{bmatrix} \vec{a}_1 \amp \cdots \amp \vec{a}_n \end{bmatrix}
\end{equation*}
The arithmetic of vectors naturally extends to the more general matrices. Recall that a vector can be thought of as a particular type of matrix.Subsection 5.1.1 Matrix Equality, Addition, Subtraction, and Scalar Multiplication
Definition 5.1.2. Matrix addition.
Let \(A, B\) be \(m \times n\) matrices (of the same dimension). Then, the sum of \(A\) and \(B\text{,}\) is the matrix formed by adding the corresponding entries of \(A\) and \(B\text{.}\) In other words,
\begin{equation*}
\boxed{(A + B)_{ij} = \begin{bmatrix} a_{ij} + b_{ij} \end{bmatrix}}
\end{equation*}
Note that addition is only defined for matrices that have equal dimensions. Subtraction of matrices is defined similarly.
For \(2 \times 2\) matrices,
\begin{equation*}
\begin{bmatrix} a_{11} \amp a_{12} \\ a_{21} \amp a_{22} \end{bmatrix} + \begin{bmatrix} b_{11} \amp b_{12} \\ b_{21} \amp b_{22} \end{bmatrix} = \begin{bmatrix} a_{11} + b_{11} \amp a_{12} + b_{12} \\ a_{21} + b_{21} \amp a_{22} + b_{22} \end{bmatrix}
\end{equation*}
Definition 5.1.3. Scalar multiplication.
Let \(A\) be an \(m \times n\) matrix, \(k \in \mathbb{R}\) be a scalar. Then, \(kA\) is the matrix formed by multiplying each of the entries of \(A\) by \(k\text{,}\) or,
\begin{equation*}
\boxed{(kA)_{ij} = kA_{ij}}
\end{equation*}
For \(2 \times 2\) matrices,
\begin{equation*}
k A = k \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix} = \begin{bmatrix} ka \amp kb \\ kc \amp kd \end{bmatrix}
\end{equation*}
The previous definitions focussed on the considering matrices entry-wise (that is, entry-by-entry). The operations for a matrix can also be thought of in terms of column vectors.
- The sum \(A + B\) is the matrix whose columns are the sums of the corresponding columns of \(A\) and \(B\text{,}\) or,\begin{equation*} A + B = \begin{bmatrix} \vec{a}_1 + \vec{b}_1 \amp \vec{a}_2 + \vec{b}_2 \amp \cdots \amp \vec{a}_n + \vec{b}_n \end{bmatrix} \end{equation*}
- The scalar multiple \(kA\) is the matrix whose columns are the scalar multiples of vectors \(k \vec{a}_j\text{,}\) or,\begin{equation*} kA = \begin{bmatrix} k \vec{a}_1 \amp k \vec{a}_2 \amp \cdots \amp k \vec{a}_n \end{bmatrix} \end{equation*}
In a similar way as vectors, \((-1)A\) is denoted by \(-A\text{,}\) and also subtraction of matrices \(A - B\) is just \(A + (-1)B\text{.}\)
Subsection 5.1.2 Properties of Matrix Addition
Definition 5.1.4.
An \(m \times n\) matrix whose entries are all zero is called a zero matrix, and is typically denoted by O, or sometimes 0.The size of a zero matrix is usually clear from the context. The zero matrix has the property that,
\begin{equation*}
A + O = A
\end{equation*}
i.e. it is the additive identity for the set of all \(n \times m\) matrices. If \(0\) is used to denote the zero matrix, then note it is clear in this equation that 0 is a matrix, since a matrix \(A\) cannot be added to the number 0.
\(0 A = O\text{,}\)Theorem 5.1.5.
Let \(A, B, C\) be \(m \times n\) matrices, \(0\) be the \(m \times n\) zero matrix. Then, addition has the following properties:
- Commutative property.\begin{equation*} A + B = B + A \end{equation*}
- Associative property.\begin{equation*} (A + B) + C = A + (B + C) \end{equation*}
- Additive identity property.\begin{equation*} A + 0 = A \end{equation*}
- Additive inverse property. For a matrix \(A\text{,}\) the matrix \(-A = \begin{bmatrix} -a_{ij} \end{bmatrix}\text{,}\) consisting of the additive inverses of the entires of \(A\text{,}\) is the additive inverse of \(A\text{,}\) as,\begin{equation*} A + (-A) = 0 \end{equation*}
The associative property means that sums of three or more matrices can be written without brackets, for example \(A + B + C\text{.}\)
Matrix addition also follows the natural laws when combined with scalar multiplication.
Theorem 5.1.6.
Let \(A, B\) be \(m \times n\) matrices, \(r, s \in \mathbb{R}\) be scalars. Then,
- Scalar distributes over matrix addition.\begin{equation*} r(A + B) = rA + rB \end{equation*}
- Matrix distributes over scalar addition.\begin{equation*} (r + s)A = rA + sA \end{equation*}
- Associativity of scalar multiplication.\begin{equation*} r(sA) = (rs)A \end{equation*}
Proof.
- Proof of 1. for \(2 \times 2\) matrices. Let \(A = \begin{bmatrix} a \amp b \\ c \amp d \end{bmatrix}, B = \begin{bmatrix} e \amp f \\ g \amp h \end{bmatrix}\text{.}\) Then,\begin{align*} r(A + B) = r \begin{bmatrix} a + e \amp b + f \\ c + g \amp d + h \end{bmatrix} \amp = \begin{bmatrix} r(a + e) \amp r(b + f) \\ r(c + g) \amp r(d + h) \end{bmatrix}\\ \amp = \begin{bmatrix} ra + re \amp rb + rf \\ rc + rg \amp rd + rh \end{bmatrix}\\ \amp = \begin{bmatrix} ra \amp rb \\ rc \amp rd \end{bmatrix} + \begin{bmatrix} re \amp rf \\ rg \amp rh \end{bmatrix}\\ \amp = r A + r B \end{align*}