Linear Algebra – Matrices – The matrix multiplication
The matrix multiplication has the following properties:
Theorem: Let \(A\) be an \(m\times n\) matrix, and let \(B\) and \(C\) be matrices with sizes for which the indicated sums and products are defined, then we have:
- \(A(BC)=(AB)C\)
- \(A(B+C)=AB+AC\)
- \((B+C)A=BA+CA\)
- \(r(AB)=(rA)B=A(rB)\) for each \(r\in\mathbb{R}\)
- \(I_mA=A=AI_n\)
In general we have:
- \(AB\neq BA\)
- \(AB=AC\quad\mathrel{\rlap{\hskip .5em/}}\Longrightarrow\quad B=C\)
- \(AB=0\quad\mathrel{\rlap{\hskip .5em/}}\Longrightarrow\quad A=0\quad\text{or}\quad C=0\)
Examples:
If \(A=\begin{pmatrix}1&-1\\2&3\end{pmatrix}\) and \(B=\begin{pmatrix}1&0&-1\\-2&1&3\end{pmatrix}\), then
\[AB=\begin{pmatrix}1&-1\\2&3\end{pmatrix}\begin{pmatrix}1&0&-1\\-2&1&3\end{pmatrix}=\begin{pmatrix}3&-1&-4\\-4&3&7\end{pmatrix} \quad\text{and}\;BA\;\text{does not exist}.\]If \(A=\begin{pmatrix}1&-1&0\\-1&2&3\end{pmatrix}\) and \(B=\begin{pmatrix}1&0&-1\\-2&1&3\end{pmatrix}\), then both \(AB\) and \(BA\) do not exist.
If \(A=\begin{pmatrix}1&-1&0\\-1&2&3\end{pmatrix}\) and \(B=\begin{pmatrix}1&-2\\0&1\\-1&3\end{pmatrix}\), then
\[AB=\begin{pmatrix}1&-1\\2&3\end{pmatrix}\begin{pmatrix}1&-2\\0&1\\-1&3\end{pmatrix}=\begin{pmatrix}1&-3\\-4&13\end{pmatrix} \quad\text{and}\quad BA=\begin{pmatrix}1&-2\\0&1\\-1&3\end{pmatrix}\begin{pmatrix}1&-1&0\\-1&2&3\end{pmatrix}=\begin{pmatrix}3&-5&-6\\-1&2&3\\-4&7&9\end{pmatrix}.\]If \(A=\begin{pmatrix}1&-1\\2&3\end{pmatrix}\) and \(B=\begin{pmatrix}1&-2\\-1&3\end{pmatrix}\), then
\[AB=\begin{pmatrix}1&-1\\2&3\end{pmatrix}\begin{pmatrix}1&-2\\-1&3\end{pmatrix}=\begin{pmatrix}2&-5\\-1&5\end{pmatrix} \quad\text{and}\quad BA=\begin{pmatrix}1&-2\\-1&3\end{pmatrix}\begin{pmatrix}1&-1\\2&3\end{pmatrix}=\begin{pmatrix}-3&-7\\5&10\end{pmatrix}.\]If \(A=\begin{pmatrix}1&-1\\2&3\end{pmatrix}\) and \(B=\begin{pmatrix}-1&-1\\2&1\end{pmatrix}\), then
\[AB=\begin{pmatrix}1&-1\\2&3\end{pmatrix}\begin{pmatrix}-1&-1\\2&1\end{pmatrix}=\begin{pmatrix}-3&-2\\4&1\end{pmatrix} \quad\text{and}\quad BA=\begin{pmatrix}-1&-1\\2&1\end{pmatrix}\begin{pmatrix}1&-1\\2&3\end{pmatrix}=\begin{pmatrix}-3&-2\\4&1\end{pmatrix}.\]So in some cases it holds that \(AB=BA\) (the commutative property). Then we say that the matrices \(A\) en \(B\) commute.
If \(A=\begin{pmatrix}2&1\\2&1\end{pmatrix}\) and \(B=\begin{pmatrix}1&-1\\-3&3\end{pmatrix}\), then
\[AB=\begin{pmatrix}2&1\\2&1\end{pmatrix}\begin{pmatrix}1&-1\\-3&3\end{pmatrix}=\begin{pmatrix}-1&1\\-1&1\end{pmatrix} \quad\text{and}\quad BA=\begin{pmatrix}1&-1\\-3&3\end{pmatrix}\begin{pmatrix}2&1\\2&1\end{pmatrix}=\begin{pmatrix}0&0\\0&0\end{pmatrix}.\]Hence: \(BA=0\), however \(B\neq0\) and \(A\neq0\).
If \(A=\begin{pmatrix}1&2\\2&4\end{pmatrix}\), \(B=\begin{pmatrix}1&-1\\1&2\end{pmatrix}\) and \(C=\begin{pmatrix}3&1\\1&0\end{pmatrix}\), then
\[AB=\begin{pmatrix}1&2\\2&4\end{pmatrix}\begin{pmatrix}1&-1\\1&2\end{pmatrix}=\begin{pmatrix}3&3\\6&6\end{pmatrix} \quad\text{and}\quad AC=\begin{pmatrix}1&2\\2&4\end{pmatrix}\begin{pmatrix}3&1\\1&0\end{pmatrix}=\begin{pmatrix}3&3\\6&6\end{pmatrix}\]Hence: \(AB=AC\), however \(B\neq C\).
Definition: If \(A\) is a square matrix, then \(A^k=\underbrace{AA\cdots A}_{k\;\text{times}}\) for \(k=1,2,3,\ldots\) and \(A^0=I\).
Theorem: If \(A\) is a square matrix, then we have: \(A^k=AA^{k=1}\) for \(k=1,2,3,\ldots\).
From the rules of calculation it follows that \(A^3=AA^2=A^2A\) and this implies that \(A\) en \(A^2\) commute.
Hence, although mostly we have that \(AB\neq BA\) this property can be used to find two commuting matrices quite easily.
Example: If \(A=\begin{pmatrix}1&-1\\2&3\end{pmatrix}\), then \(A^2=\begin{pmatrix}1&-1\\2&3\end{pmatrix}\begin{pmatrix}1&-1\\2&3\end{pmatrix}=\begin{pmatrix}-1&-4\\8&7\end{pmatrix}\).
Then we have:
\[\begin{pmatrix}1&-1\\2&3\end{pmatrix}\begin{pmatrix}-1&-4\\8&7\end{pmatrix}=\begin{pmatrix}-9&-11\\22&13\end{pmatrix} \quad\text{and}\quad\begin{pmatrix}-1&-4\\8&7\end{pmatrix}\begin{pmatrix}1&-1\\2&3\end{pmatrix}=\begin{pmatrix}-9&-11\\22&13\end{pmatrix}.\]If \(A=\begin{pmatrix}0&1\\0&0\end{pmatrix}\), then \(A^2=\begin{pmatrix}0&1\\0&0\end{pmatrix}\begin{pmatrix}0&1\\0&0\end{pmatrix}=\begin{pmatrix}0&0\\0&0\end{pmatrix}\). Such a matrix is called nilpotent, which means that a certain power of the matrix equals the zero matrix.
Another example is \(A=\begin{pmatrix}0&1&2\\0&0&3\\0&0&0\end{pmatrix}\). Note that we have \[A^2=\begin{pmatrix}0&1&2\\0&0&3\\0&0&0\end{pmatrix}\begin{pmatrix}0&1&2\\0&0&3\\0&0&0\end{pmatrix}=\begin{pmatrix}0&0&3\\0&0&0\\0&0&0\end{pmatrix} \quad\text{and}\quad A^3=\begin{pmatrix}0&1&2\\0&0&3\\0&0&0\end{pmatrix}\begin{pmatrix}0&0&3\\0&0&0\\0&0&0\end{pmatrix}=\begin{pmatrix}0&0&0\\0&0&0\\0&0&0\end{pmatrix}.\]
Fibonacci
The Fibonacci sequence \(1,1,2,3,5,8,13,21,34,55,89,\ldots\) is defined by \(F_{n+2}=F_n+F_{n+1}\) for \(n=1,2,3,\ldots\) with \(F_1=F_2=1\).
For computational reasons we use \(F_{n+2}=F_n+F_{n+1}\) for \(n=0,1,2,\ldots\) with \(F_0=0\) and \(F_1=1\) instead. Then we havet:
\[\begin{pmatrix}F_{n+1}&F_n\\F_n&F_{n-1}\end{pmatrix}=\begin{pmatrix}1&1\\1&0\end{pmatrix}^n,\quad n=1,2,3,\ldots.\]Proof:
By mathematical induction: for \(n=1\) it reads \(\displaystyle\begin{pmatrix}F_2&F_1\\F_1&F_0\end{pmatrix}=\begin{pmatrix}1&1\\1&0\end{pmatrix}\)
which is true. Assuming that \(\begin{pmatrix}F_{n+1}&F_n\\F_n&F_{n-1}\end{pmatrix}=\begin{pmatrix}1&1\\1&0\end{pmatrix}^n\) holds for certain value of \(n\), then we have
This implies that
\begin{align*} \begin{pmatrix}F_{m+n+1}&F_{m+n}\\F_{m+n}&F_{m+n-1}\end{pmatrix}&=\begin{pmatrix}1&1\\1&0\end{pmatrix}^{m+n} =\begin{pmatrix}1&1\\1&0\end{pmatrix}^m\begin{pmatrix}1&1\\1&0\end{pmatrix}^n=\begin{pmatrix}F_{m+1}&F_m\\F_m&F_{m-1}\end{pmatrix} \begin{pmatrix}F_{n+1}&F_n\\F_n&F_{n-1}\end{pmatrix}\\[2.5mm] &=\begin{pmatrix}F_{m+1}F_{n+1}+F_mF_n&F_{m+1}F_n+F_mF_{n-1}\\F_mF_{n+1}+F_{m-1}F_n&F_mF_n+F_{m-1}F_{n-1}\end{pmatrix}. \end{align*}This implies that
\[F_{m+n+1}=F_{m+1}F_{n+1}+F_mF_n\quad\text{en}\quad F_{m+n}=F_{m+1}F_n+F_mF_{n-1}=F_mF_{n+1}+F_{m-1}F_n.\]Taking \(m=n\) we obtain that
\[F_{2n+1}=F_{n+1}^2+F_n^2=(F_{n+1}+F_n)^2-2F_{n+1}F_n=F_{n+2}^2-2F_{n+1}F_n\]and
\[F_{2n}=F_n\left(F_{n+1}+F_{n-1}\right)=F_n\left(F_n+2F_{n-1}\right).\]Last modified on March 22, 2021