Matrices. Operations with matrices.
Matrices. Operations with matrices.
A matrix of size $m\times n$ is called a rectangular table of numbers $a_{ij},, i=1, 2, ...,m,$ $j=1, 2, ..., n$,
$$A=\begin{pmatrix}a_{11}&a_{12}&...&a_{1n}\\a_{21}&a_{22}&...&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{m1}&a_{m2}&...&a_{mn}\end{pmatrix}$$
consisting of $m$ rows and $n$ columns.
The sum $A+B$ of matrices of size $m\times n$, $A={a_{ij}}$ and $B={b_{ij}}$, is defined as the matrix $C={c_{ij}}$ of the same order, where each element is equal to the sum of the corresponding elements of matrices $A$ and $B$:
$$A+B=\begin{pmatrix}a_{11}&a_{12}&...&a_{1n}\\a_{21}&a_{22}&...&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{m1}&a_{m2}&...&a_{mn}\end{pmatrix}+\begin{pmatrix}b_{11}&b_{12}&...&b_{1n}\\b_{21}&b_{22}&...&b_{2n}\\\vdots&\vdots&\ddots&\vdots\\b_{m1}&b_{m2}&...&b_{mn}\end{pmatrix}=$$
$$=\begin{pmatrix}a_{11}+b_{11}&a_{12}+b_{12}&...&a_{1n}+b_{1n}\\a_{21}+b_{21}&a_{22}+b_{22}&...&a_{2n}+b_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{m1}+b_{m1}&a_{m2}+b_{m2}&...&a_{mn}+b_{mn}\end{pmatrix}$$
The product $\alpha A$ of a matrix $A={a_{ij}}$ by a number $\alpha$ (real or complex) is defined as the matrix $B={b_{ij}}$, where each element is equal to the product of the number $\alpha$ by the corresponding element of matrix $A$:
$$\alpha A=\alpha\left(\begin{array}{} a_{11}&a_{12}&...&a_{1n}\\ a_{21}&a_{22}&...&a_{2n}\\ \vdots&\vdots&\vdots&\vdots\\ a_{m1}&a_{m2}&...&a_{mn}\end{array}\right)=\left(\begin{array}{}\alpha a_{11}&\alpha a_{12}&...&\alpha a_{1n}\\ \alpha a_{21}&\alpha a_{22}&...&\alpha a_{2n}\\ \vdots&\vdots&\ddots&\vdots\\ \alpha a_{m1}&\alpha a_{m2}&...&\alpha a_{mn} \end{array}\right). $$
The product $AB$ of a matrix $A={a_{ij}}$ of size $m\times n$ by a matrix $B={b_{ij}}$ of size $n\times k$ is defined as the matrix $C={c_{ij}}$ of size $m\times k$, where each element standing in the $i$-th row and $j$-th column is equal to the sum of the products of the corresponding elements of the $i$-th row of matrix $A$ and the $j$-th column of matrix $B$:
$$A\times B=\left(\begin{array}{}a_{11}&a_{12}&...&a_{1n}\\ a_{21}&a_{22}&...&a_{2n}\\ \vdots&\vdots&\ddots&\vdots\\ a_{m1}&a_{m2}&...&a_{mn}\end{array}\right)\times\left(\begin{array}{}b_{11}&b_{12}&...&b_{1k}\\ b_{21}&b_{22}&...&b_{2k}\\ \vdots&\vdots&\ddots&\vdots\\ b_{n1}&b_{n2}&...&b_{nk}\end{array}\right)=$$ $$=\left(\begin{array}{}\sum\limits_{\nu=1}^na_{1\nu}b_{\nu 1}&\sum\limits_{\nu=1}^na_{1\nu}b_{\nu 2}&...&\sum\limits_{\nu=1}^na_{1\nu}b_{\nu k}\\ \sum\limits_{\nu=1}^na_{2\nu}b_{\nu 1}&\sum\limits_{\nu=1}^na_{2\nu}b_{\nu 2}&...&\sum\limits_{\nu=1}^na_{2\nu}b_{\nu k}\\ \vdots&\vdots&\ddots&\vdots\\ \sum\limits_{\nu=1}^na_{m\nu}b_{\nu 1}&\sum\limits_{\nu=1}^n a_{m\nu}b_{\nu 2}&...&\sum\limits_{\nu=1}^na_{m\nu}b_{\nu k} \end{array}\right)=C. $$
The matrix $A^T$ is called the transpose of the matrix $A$ if the condition $a_{ij}^T=a_{ji}$ is satisfied for all $i, j$, where $a_{ij}$ and $a_{ij}^T$ are the elements of matrices $A$ and $A^T$ respectively:
$$A=\begin{pmatrix}a_{11}&a_{12}&...&a_{1n}\\a_{21}&a_{22}&...&a_{2n}\\\vdots&\vdots&\ddots&\vdots\\a_{m1}&a_{m2}&...&a_{mn}\end{pmatrix}\Rightarrow A^T=\begin{pmatrix}a_{11}&a_{21}&...&a_{m1}\\a_{12}&a_{22}&...&a_{m2}\\\vdots&\vdots&\ddots&\vdots\\a_{1n}&a_{2n}&...&a_{mn}\end{pmatrix}$$
EXAMPLES.
1. Given
$$A=\begin{pmatrix} {} 2&1&3\\5&3&-6\\-1&2&4\end{pmatrix}; \quad B=\begin{pmatrix} {} 6&-3&2\\4&-2&5\\ 3&2&7\end{pmatrix}. $$
Compute
а) $A+B;$
b) $3A;$
c) $AB;$
d) $A^T.$
Solution.
а) $$A+B=\begin{pmatrix} {} 2&1&3\\5&3&-6\\-1&2&4\end{pmatrix}+\begin{pmatrix} {} 6&-3&2\\4&-2&5\\ 3&2&7\end{pmatrix}=\begin{pmatrix}{}2+6&1-3&3+2\\5+4&3-2&-6+5\\-1+3&2+2&4+7\end{pmatrix} =\begin{pmatrix} {} 8&-2&5\\9&1&-1\\2&4&11\end{pmatrix}.$$
b) $$3A=3\begin{pmatrix}{}2&1&3\\5&3&-6\\-1&2&4\end{pmatrix}=\begin{pmatrix}{} 3\cdot2&3\cdot1&3\cdot3\\3\cdot5&3\cdot3&3\cdot(-6)\\3\cdot(-1)&3\cdot2&3\cdot4\end{pmatrix}=$$ $$=\begin{pmatrix} {} 6&3&9\\15&9&-18\\-3&6&12\end{pmatrix}. $$
c) $$AB=\begin{pmatrix} {} 2&1&3\\5&3&-6\\-1&2&4\end{pmatrix}\begin{pmatrix} {} 6&-3&2\\4&-2&5\\ 3&2&7\end{pmatrix}=$$ $$\begin{pmatrix}{}2\cdot6+1\cdot4+3\cdot3&2\cdot(-3)+1\cdot(-2)+3\cdot2&2\cdot2+1\cdot5+3\cdot7\\5\cdot6+3\cdot4-6\cdot3&5\cdot(-3)+3\cdot(-2)-6\cdot2&5\cdot2+3\cdot5-6\cdot7\\-1\cdot6+2\cdot4+4\cdot3&-1\cdot(-3)+2\cdot(-2)+4\cdot2&-1\cdot2+2\cdot5+4\cdot7\end{pmatrix}=$$ $$=\begin{pmatrix} {} 25&-2&30\\24&-33&-17\\14&7&36\end{pmatrix}.$$
d) $$A^T=\begin{pmatrix} {} 2&5&-1\\1&3&2\\3&-6&4\end{pmatrix}.$$
Tags: