Linear Algebra/Addition, Multiplication, and Transpose

Addition and subtraction
Two matrices can only be added or subtracted if they have the same size. Matrix addition and subtraction are done entry-wise, which means that each entry in A+B is the sum of the corresponding entries in A and B.


 * $$A=\begin{bmatrix}7&&5&&3\\4&&0&&5\end{bmatrix}\qquad B=\begin{bmatrix}1&&1&&1\\-1&&3&&2\end{bmatrix}$$

Here is an example of matrix addition
 * $$A+B=\begin{bmatrix}7+1&&5+1&&3+1\\4-1&&0+3&&5+2\end{bmatrix}=\begin{bmatrix}8&&6&&4\\3&&3&&7\end{bmatrix}$$

And an example of subtraction
 * $$A-B=\begin{bmatrix}7-1&&5-1&&3-1\\4+1&&0-3&&5-2\end{bmatrix}=\begin{bmatrix}6&&4&&2\\5&&-3&&3\end{bmatrix}$$

Remember you can not add or subtract two matrices of different sizes.

The following rules applies to sums and scalar multiples of matrices. Let $$A,B,C$$ be matrices of the same size, and let $$r,s$$ be scalars.
 * $$A+B=B+A$$
 * $$(A+B)+C=A+(B+C)$$
 * $$A+0=A$$
 * $$r(A+B)=rA+rB$$
 * $$(r+s)A=rA+sA$$
 * $$r(sA)=(rs)A$$

Multiplication
What is matrix multiplication? You can multiply two matrices if, and only if, the number of columns in the first matrix equals the number of rows in the second matrix.

Otherwise, the product of two matrices is undefined. The product matrix's dimensions are
 * $$\to(\text{rows of first matrix})\times(\text{columns of the second matrix})$$

In above multiplication, the matrices cannot be multiplied since the number of columns in the 1st one, matrix $$A$$ is not equals the number of rows in the 2nd, matrix $$B$$. The Dimensions of the product matrix. Rows of 1st matrix × Columns of 2nd

Powers
If $$A$$ is an $$n \times n$$ matrix and if $$k$$ is a positive integer, then $$A^k$$ denotes the product of $$k$$ copies of $$A$$
 * $$A^k=\begin{matrix}\underbrace{A \cdots A} \\ k\end{matrix}$$

If $$A$$ is non-zero and if $$\rm x$$ is in $$\R^n$$, then $$A^k\rm x$$ is the result of left-multiplying $$\rm x$$ by $$A$$ repeatedly $$k$$ times. If $$k=0$$, then $$A^0\rm x$$ should be $$\rm x$$ itself. Thus $$A^0$$ is interpreted as the identity matrix.

Transpose
Given the $$m\times n$$ matrix $$A$$, the transpose of $$A$$ is the $$n\times m$$ , denoted $$A^T$$ , whose columns are formed from the corresponding rows of $$A$$.

For example
 * $$A=\begin{bmatrix}a&&b\\c&&d\end{bmatrix}\qquad B=\begin{bmatrix}3&&5\\2&&7\\6&&9\\1&&0\\5&&2\end{bmatrix}$$
 * $$A^T=\begin{bmatrix}a&&c\\b&&d\end{bmatrix}\qquad B^T=\begin{bmatrix}3&&2&&6&&1&&5\\5&&7&&9&&0&&2\end{bmatrix}$$

The following rules applied when working with transposing
 * 1) $$(A^T)^T=A$$
 * 2) $$(A+B)^T=A^T+B^T$$
 * 3) For any scalar $$r$$, $$(rA)^T=rA^T$$
 * 4) $$(AB)^T=B^TA^T$$

The 4th rule can be generalize to products of more than two factors, as "The transpose of a product of matrices equals the product of their transposes in the reverse order." Meaning
 * $$(a_1,a_2,a_3,\dots,a_n)^T=a_n^T,\dots,a_3^T,a_2^T,a_1^T$$