1.2: Addition and Multiplication of Matrices
View Addition & Multiplication of Matrices on YouTube
Matrices can be added and multiplied. Matrices can be added only if they have the same dimension, and addition proceeds element by element. For example,
\[\left(\begin{array}{cc}a&b\\c&d\end{array}\right)+\left(\begin{array}{cc}e&f\\g&h\end{array}\right)=\left(\begin{array}{cc}a+e&b+f\\c+g&d+h\end{array}\right).\nonumber \]
Multiplication of a matrix by a scalar is also easy. The rule is to just multiply every element of the matrix by the scalar. The \(2\)-by-\(2\) case is illustrated a
\[k\left(\begin{array}{cc}a&b\\c&d\end{array}\right)=\left(\begin{array}{cc}ka&kb\\kc&kd\end{array}\right).\nonumber \]
Matrix multiplication, however, is more complicated. Matrices (excluding the scalar) can be multiplied only if the number of columns of the left matrix equals the number of rows of the right matrix. In other words, an \(m\)-by-\(n\) matrix on the left can be multiplied by an \(n\)-by-\(k\) matrix on the right. The resulting matrix will be \(m\)-by-\(k\). We can illustrate matrix multiplication using two \(2\)-by-\(2\) matrices, writing
\[\left(\begin{array}{cc}a&b\\c&d\end{array}\right)\left(\begin{array}{cc}e&f\\g&h\end{array}\right)=\left(\begin{array}{cc}ae+bg&af+bh\\ce+dg&cf+dh\end{array}\right).\nonumber \]
The standard way to multiply matrices is as follows. The first row of the left matrix is multiplied against and summed with the first column of the right matrix to obtain the element in the first row and first column of the product matrix. Next, the first row is multiplied against and summed with the second column; then the second row is multiplied against and summed with the first column; and finally the second row is multiplied against and summed with the second column.
In general, a particular element in the resulting product matrix, say in row \(k\) and column \(l\), is obtained by multiplying and summing the elements in row \(k\) of the left matrix with the elements in column \(l\) of the right matrix.
Consider the Fibonacci \(\text{Q}\)-matrix given by
\[\text{Q}=\left(\begin{array}{cc}1&1\\1&0\end{array}\right)\nonumber \]
Determine \(\text{Q}^n\) in terms of the Fibonacci numbers.
Solution
The famous Fibonacci sequence is \(1,\: 1,\: 2,\: 3,\: 5,\: 8,\: 13,\ldots\), where each number in the sequence is the sum of the preceeding two numbers, and the first two numbers are set equal to one. With \(F_n\) the \(n\)th Fibonacci number, the mathematical definition is
\[F_{n+1}=F_n+F_{n-1},\quad F_1=F_2=1,\nonumber \]
and we may define \(F_0=0\) so that \(F_0+F_1=F_2\).
Notice what happens when a matrix is multiplied by \(\text{Q}\) on the left:
\[\left(\begin{array}{cc}1&1\\1&0\end{array}\right)\left(\begin{array}{cc}a&b\\c&d\end{array}\right)=\left(\begin{array}{cc}a+c&b+d\\a&c\end{array}\right).\nonumber \]
The first row is replaced by the sum of the first and second rows, and the second row is replaced by the first row. Using the Fibonacci numbers, we can cleverly write the Fibonacci \(\text{Q}\)-matrix as
\[\text{Q}=\left(\begin{array}{cc}1&1\\1&0\end{array}\right)=\left(\begin{array}{cc}F_2&F_1\\F_1&F_0\end{array}\right);\nonumber \]
and then using the Fibonacci recursion relation we have
\[\text{Q}^2=\left(\begin{array}{cc}F_3&F_2\\F_2&F_1\end{array}\right),\quad\text{Q}^3=\left(\begin{array}{cc}F_4&F_3\\F_3&F_2\end{array}\right).\nonumber \]
More generally,
\[\text{Q}^n=\left(\begin{array}{cc}F_{n+1}&F_n \\ F_n&F_{n-1}\end{array}\right).\nonumber \]