# Algebra of Matrices

The algebra of matrices includes

1. Addition of Matrices
2. Subtraction of Matrices
3. Multiplication of a Matrix by Scalar
4. Multiplication of Matrices

Two matrices $A$ and $B$ can be added only if the order of matrix $A$ is equal to the order of matrix $B$.

Then, addition $(A + B)$ of matrices $A$ and $B$ can be obtained by adding the corresponding elements $A$ and $B$. The order of $(A + B)$ is the same as the order of $A$ the order of $B$.

Suppose

Then

Example:
Let

Then

Subtraction of Matrices:
Subtraction of two matrices is similar to the addition of two matrices. Two matrices $A$ and $B$ are said to be conformable to subtraction $A - B$ if both $A$ and $B$ have the same order.

Subtraction can be done by taking the differences of the corresponding elements of matrices $A$ and $B$. The order of $A - B$ is the same as the order of $A$ and order of $B$.

Suppose

Then

Example:
Let

Then

Multiplication of a Matrix by Scalar:
Let $A$ be any given matrix and let $k$ be any real number (scalar), then multiplication $kA$, of the matrix $A$ with the real number $k$ is obtained by multiplying each element of the matrix $A$ by $k$.

Suppose

Then

Example:
Let

Then

Multiplication of Matrices:
Let $A$ and $B$ be any two given matrices, then the multiplication $AB$ can be possible only if the number of columns of matrix $A$ is equal to the number of rows of matrix $B$. Then multiplication $AB$ can be obtained by the following method.

The element (1,1) position of $AB$ is obtained by adding the products of the corresponding elements of the 1st row of $A$ and the 1st column of $B$. Similarly, the element (1,2) position of $AB$ is obtained by adding the products of the corresponding elements of the 2nd row of $A$ and the 2nd column of $B$ and so on.

Suppose

Example:
Let

Since number of columns of $A$ is 3 and number of rows of $B$ is also 3,  $AB$ can be found.

i.e.