[Latexpage]
In this section, we will introduce the concept of using matrices to solve complex analytical problems. A matrix is a rectangular array of numbers arranged in m rows (horizontal lines) and n columns (vertical lines), graphically depicted as such:
\begin{equation*}
{A_{{\normalsubformula{\text{ij}}}}=\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{22}}}&a_{{\text{23}}}\\a_{{\text{31}}}&a_{{\text{32}}}&a_{{\text{33}}}\end{matrix}\right]}
\end{equation*}
Matrices can be expanded to as many rows and columns as desired and do not need to maintain the three by three format as illustrated above. In cases, we will see single row or single column matrices, these are called row and column vectors, respectively.
Matrix Multiplication
We can only multiply matrices if the number of columns in the first matrix is the same as the number of rows in the second matrix.
To illustrate this, let’s take a general 2 x3 matrix multiplied by a 3 x2 matrix.
${A=\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{22}}}&a_{{\text{23}}}\end{matrix}\right]}$
and
${B=\left[\begin{matrix}b_{{\text{11}}}&b_{{\text{12}}}\\b_{{\text{21}}}&b_{{\text{22}}}\\b_{{\text{31}}}&b_{{\text{32}}}\end{matrix}\right]}$
${\normalsubformula{\text{AB}}}$=${\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{22}}}&a_{{\text{23}}}\end{matrix}\right]}$ ${\left[\begin{matrix}b_{{\text{11}}}&b_{{\text{12}}}\\b_{{\text{21}}}&b_{{\text{22}}}\\b_{{\text{31}}}&b_{{\text{32}}}\end{matrix}\right]}$=
$ $
${\left[\begin{matrix}a_{{\text{11}}}b_{{\text{11}}}+a_{{\text{12}}}b\multiscripts{_{{\text{21}}}}{}{}{\text{}}{}+a_{{\text{13}}}b_{{\text{31}}}&a_{{\text{11}}}b_{{\text{12}}}+a_{{\text{12}}}b\multiscripts{_{{\text{22}}}}{}{}{\text{}}{}+a_{{\text{13}}}b_{{\text{32}}}\\a_{{\text{21}}}b_{{\text{11}}}+a_{{\text{22}}}b\multiscripts{_{{\text{21}}}}{}{}{\text{}}{}+a_{{\text{23}}}b_{{\text{31}}}&a_{{\text{21}}}b_{{\text{12}}}+a_{{\text{22}}}b\multiscripts{_{{\text{22}}}}{}{}{\text{}}{}+a_{{\text{23}}}b_{{\text{32}}}\end{matrix}\right]}$
The elements are multiplied by starting to work across the top row of the first matrix and down the first column of the second matrix, element by element. We add the resulting products and the answer goes in the top left position of the answer matrix. The process is then repeated for each element.
Example
Multiply A and B:
\begin{equation*}
{A=\left[\begin{matrix}0&-1&2\\4&\text{11}&2\end{matrix}\right]}
\end{equation*}
\begin{equation*}
{B=\left[\begin{matrix}3&-1\\1&2\\6&1\end{matrix}\right]}
\end{equation*}
${\normalsubformula{\text{AB}}}$= ${\left[\begin{matrix}0&-1&2\\4&\text{11}&2\end{matrix}\right]}$
${\left[\begin{matrix}3&-1\\1&2\\6&1\end{matrix}\right]}$
\begin{equation*}
{\normalsubformula{\text{AB}}=\left[\begin{matrix}0-1+\text{12}&0-2+2\\\text{12}+\text{11}+\text{12}&-4+\text{22}+2\end{matrix}\right]=\left[\begin{matrix}\text{11}&0\\\text{35}&\text{20}\end{matrix}\right]}
\end{equation*}
Matrix Addition and subtraction
Just as with multiplication, the number of columns in the first matrix must be the same as the number of rows in the second matrix. The resulting matrix will have the number of rows of the first matrix and the number of columns of the second matrix such that given:
\begin{equation*}
{A=\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{22}}}&a_{{\text{23}}}\end{matrix}\right]}
\end{equation*}
And
\begin{equation*}{B=\left[\begin{matrix}b_{{\text{11}}}&b_{{\text{12}}}\\b_{{\text{21}}}&b_{{\text{22}}}\\b_{{\text{31}}}&b_{{\text{32}}}\end{matrix}\right]}\end{equation*}
${A+B}$=${\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{22}}}&a_{{\text{23}}}\end{matrix}\right]}$+${\left[\begin{matrix}b_{{\text{11}}}&b_{{\text{12}}}\\b_{{\text{21}}}&b_{{\text{22}}}\\b_{{\text{31}}}&b_{{\text{32}}}\end{matrix}\right]}$=
$ $
\begin{equation*}
{\left[\begin{matrix}(a_{{\text{11}}}+b_{{\text{11}}})+(a_{{\text{12}}}+b\multiscripts{_{{\text{21}}}}{}{}{\text{}}{})+(a_{{\text{13}}}+b_{{\text{31}}})&(a_{{\text{11}}}+b_{{\text{12}}})+(a_{{\text{12}}}+b\multiscripts{_{{\text{22}}}}{}{}{\text{}}{})+(a_{{\text{13}}}+b_{{\text{32}}})\\(a_{{\text{21}}}+b_{{\text{11}}})+(a_{{\text{22}}}+b\multiscripts{_{{\text{21}}}}{}{}{\text{}}{})+(a_{{\text{23}}}+b_{{\text{31}}})&(a_{{\text{21}}}+b_{{\text{12}}})+(a_{{\text{22}}}+b\multiscripts{_{{\text{22}}}}{}{}{\text{}}{})+(a_{{\text{23}}}+b_{{\text{32}}})\end{matrix}\right]}
\end{equation*}
Example
Add A and B:
\begin{equation*}
{A=\left[\begin{matrix}4&-1&0\\\text{12}&\text{11}&2\end{matrix}\right]}
\end{equation*}
\begin{equation*}
{B=\left[\begin{matrix}6&0\\\text{10}&\text{12}\\6&-1\end{matrix}\right]}
\end{equation*}
\begin{equation*}{A+B}$= ${\left[\begin{matrix}4&-1&0\\\text{12}&\text{11}&2\end{matrix}\right]}$ ${\left[\begin{matrix}6&0\\\text{10}&\text{12}\\6&-1\end{matrix}\right]}\end{equation*}
\begin{equation*}
{A+B=\left[\begin{matrix}\text{10}+9+6&4+\text{11}-1\\\text{18}+\text{21}+8&\text{12}+\text{23}+1\end{matrix}\right]=\left[\begin{matrix}\text{25}&\text{14}\\\text{47}&\text{36}\end{matrix}\right]}
\end{equation*}
Matrix Subtraction
As with addition, the resulting matrix of two matrices subtracted from each other will have the number of rows of the first matrix and the number of columns of the second matrix such that given:
\begin{equation*}
{A=\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{22}}}&a_{{\text{23}}}\end{matrix}\right]}
\end{equation*}
And
\begin{equation*}{B=\left[\begin{matrix}b_{{\text{11}}}&b_{{\text{12}}}\\b_{{\text{21}}}&b_{{\text{22}}}\\b_{{\text{31}}}&b_{{\text{32}}}\end{matrix}\right]}\end{equation*}
\begin{equation*}{A-B}$=${\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{22}}}&a_{{\text{23}}}\end{matrix}\right]}$+${\left[\begin{matrix}b_{{\text{11}}}&b_{{\text{12}}}\\b_{{\text{21}}}&b_{{\text{22}}}\\b_{{\text{31}}}&b_{{\text{32}}}\end{matrix}\right]}\end{equation*}=
$ $
$ $
\begin{equation*}{\left[\begin{matrix}(a_{{\text{11}}}-b_{{\text{11}}})+(a_{{\text{12}}}-b\multiscripts{_{{\text{21}}}}{}{}{\text{}}{})+(a_{{\text{13}}}-b_{{\text{31}}})&(a_{{\text{11}}}-b_{{\text{12}}})+(a_{{\text{12}}}-b\multiscripts{_{{\text{22}}}}{}{}{\text{}}{})+(a_{{\text{13}}}-b_{{\text{32}}})\\(a_{{\text{21}}}-b_{{\text{11}}})+(a_{{\text{22}}}-b\multiscripts{_{{\text{21}}}}{}{}{\text{}}{})+(a_{{\text{23}}}-b_{{\text{31}}})&(a_{{\text{21}}}-b_{{\text{12}}})+(a_{{\text{22}}}-b\multiscripts{_{{\text{22}}}}{}{}{\text{}}{})+(a_{{\text{23}}}-b_{{\text{32}}})\end{matrix}\right]}\end{equation*}
Matrix Inversion
The inverse of a square matrix ${A}$, sometimes called a reciprocal matrix, is a matrix ${A^{{-1}}}$. A matrix will
have an inverse if and only if the determinate of ${A\neq 0}$ or ${|A|}{\textgreater}0$.
The determinate of a 2 by 2 matrix can be determined:
\begin{equation*}
{|A|=\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}\\a_{{\text{21}}}&a_{{\text{22}}}\end{matrix}\right]=(a_{{\text{11}}}a_{{\text{22}}}-a_{{\text{12}}}a_{{\text{21}}})}
\end{equation*}
Example
Find the determinate of Matrix A
\begin{equation*}
{A=\left[\begin{matrix}4&2\\-1&6\end{matrix}\right]}
\end{equation*}
\begin{equation*}
{|A|=\left[\begin{matrix}4&2\\-1&6\end{matrix}\right]=(4(6)-2(-1))=\text{26}}
\end{equation*}
Getting back to inverse matrices, for a 2 by 2 matrix such as:
\begin{equation*}
{A=\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}\\a_{{\text{21}}}&a_{{\text{22}}}\end{matrix}\right]}
\end{equation*}
The inverse will be:
${A^{{-1}}}$= ${\frac{1}{|A|}}$
${\left[\begin{matrix}a_{{\text{22}}}&-a_{{\text{12}}}\\-a_{{\text{21}}}&a_{{\text{11}}}\end{matrix}\right]}$
for a 3 by 3 matrix such as:
\begin{equation*}
{A=\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{22}}}&a_{{\text{23}}}\\a_{{\text{31}}}&a_{{\text{32}}}&a_{{\text{33}}}\end{matrix}\right]}
\end{equation*}
This may seem a bit more complicated, but it really isn’t. To begin developing the inverse, choose a term in the original matrix to begin your analysis, say ${a_{{\text{11}}}}$. All you need to do, is eliminate the row and column this term is located in, and place the remainder in the inverse matrix as the new term for that position. To illustrate this:
\begin{equation*}{A=\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{22}}}&a_{{\text{23}}}\\a_{{\text{31}}}&a_{{\text{32}}}&a_{{\text{33}}}\end{matrix}\right]}\end{equation*}
\begin{equation*}
{A^{{-1}}=\frac{1}{|A|}\left[\begin{matrix}\left[\begin{matrix}a_{{\text{22}}}&a_{{\text{23}}}\\a_{{\text{32}}}&a_{{\text{33}}}\end{matrix}\right]&?&?\\?&?&?\\?&?&?\end{matrix}\right]}
\end{equation*}
Now just repeat this process until you obtain the completed inverse as such:
\begin{equation*}
{A^{{-1}}=\frac{1}{|A|}\left[\begin{matrix}\left[\begin{matrix}a_{{\text{22}}}&a_{{\text{23}}}\\a_{{\text{32}}}&a_{{\text{33}}}\end{matrix}\right]&\left[\begin{matrix}a_{{\text{21}}}&a_{{\text{23}}}\\a_{{\text{31}}}&a_{{\text{33}}}\end{matrix}\right]&\left[\begin{matrix}a_{{\text{21}}}&a_{{\text{22}}}\\a_{{\text{31}}}&a_{{\text{32}}}\end{matrix}\right]\\\left[\begin{matrix}a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{32}}}&a_{{\text{33}}}\end{matrix}\right]&\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{13}}}\\a_{{\text{31}}}&a_{{\text{33}}}\end{matrix}\right]&\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}\\a_{{\text{31}}}&a_{{\text{32}}}\end{matrix}\right]\\\left[\begin{matrix}a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{22}}}&a_{{\text{23}}}\end{matrix}\right]&\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{23}}}\end{matrix}\right]&\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}\\a_{{\text{21}}}&a_{{\text{22}}}\end{matrix}\right]\end{matrix}\right]}
\end{equation*}
Example
Find the Matrix inverse of:
\begin{equation*}
{A=\left[\begin{matrix}1&3&2\\4&1&3\\2&5&2\end{matrix}\right]}
\end{equation*}
${|A|=}$${1|\begin{matrix}1&3\\5&2\end{matrix}|-3|\begin{matrix}4&3\\2&2\end{matrix}|+2|\begin{matrix}4&1\\2&5\end{matrix}|=1(2-\text{15})-3(8-6)+2(\text{20}-2)}$
${|A|=}$ 17
\begin{equation*}
{A^{{-1}}=\frac{1}{\text{17}}\left[\begin{matrix}-\text{13}&2&\text{18}\\-4&-2&-1\\7&-5&-\text{11}\end{matrix}\right]}
\end{equation*}
Matrix Transpose
Finally, transposing a matrix can be done simply and quickly. Let’s say we are given a 3 by 2 matrix such that:
\begin{equation*}
{A=\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{12}}}&a_{{\text{13}}}\\a_{{\text{21}}}&a_{{\text{22}}}&a_{{\text{23}}}\end{matrix}\right]}
\end{equation*}
To transpose, simply flip the matrix on its side, or in better words switch the rows and columns, so that the matrix becomes a 2 by 3 with ${a_{{\text{11}}}}$ and ${a_{{\text{21}}}}$ on top:
\begin{equation*}
{A^{{T}}=\left[\begin{matrix}a_{{\text{11}}}&a_{{\text{21}}}\\a_{{\text{12}}}&a_{{\text{22}}}\\a_{{\text{13}}}&a_{{\text{23}}}\end{matrix}\right]}
\end{equation*}
Example
Transpose the given matrix:
\begin{equation*}
{A=\left[\begin{matrix}3&2&-1\\5&4&6\\-3&2&7\end{matrix}\right]}
\end{equation*}
\begin{equation*}
{A^{{T}}=\left[\begin{matrix}3&5&-3\\2&4&2\\-1&6&7\end{matrix}\right]}
\end{equation*}