CALCULATE

CALCULATE

** 4x4 matrix addition and subtraction calculator** uses two $4\times 4$ matrices $A$ and $B$ and calculates both their sum $A+B$ and their difference $A-B$. It is an online math tool specially programmed to perform matrix addition and subtraction between the two $4\times 4$ matrices.

It is necessary to follow the next steps:

- Enter two $4\times4$ matrices in the box. Elements of matrices must be real numbers.
- Press the "
**GENERATE WORK**" button to make the computation; - 4x4 matrix addition and subtraction calculator will give the sum of two $4\times4$ matrices and the difference between the first matrix and the second matrix.

The sum of two matrices $A=(a_{ij})_{4\times 4}$ and $B=(a_{ij})_{4\times 4}$ is determined by the following formula
$$\begin{align}\left(
\begin{array}{cccc}
a_{11} & a_{12} & a_{13}&a_{14} \\
a_{21} & a_{22} & a_{23}&a_{24} \\
a_{31} & a_{32} & a_{33} &a_{34}\\
a_{41} & a_{42} & a_{43} &a_{44}\\
\end{array}
\right)&+
\left(
\begin{array}{cccc}
b_{11} & b_{12} & b_{13}&b_{14} \\
b_{21} & b_{22} & b_{23}&b_{24} \\
b_{31} & b_{32} & b_{33} &b_{34}\\
b_{41} & b_{42} & b_{43} &b_{44}\\
\end{array}
\right)\\&= \left(
\begin{array}{cccc}
a_{11}+b_{11} & a_{12}+ b_{12}& a_{13}+ b_{13}&a_{14}+b_{14} \\
a_{21}+b_{21} & a_{22}+b_{22} & a_{23}+ba_{23}&a_{24}+b_{24} \\
a_{31}+b_{31} & a_{32}+b_{32} & a_{33}+b_{33} &a_{34}+b_{34}\\
a_{41}+b_{41} & a_{42}+b_{42} & a_{43}+b_{43} &a_{44}+b_{44}\\
\end{array}
\right)\end{align}$$

$$\begin{align}\left(
\begin{array}{cccc}
a_{11} & a_{12} & a_{13}&a_{14} \\
a_{21} & a_{22} & a_{23}&a_{24} \\
a_{31} & a_{32} & a_{33} &a_{34}\\
a_{41} & a_{42} & a_{43} &a_{44}\\
\end{array}
\right)&-
\left(
\begin{array}{cccc}
b_{11} & b_{12} & b_{13}&b_{14} \\
b_{21} & b_{22} & b_{23}&b_{24} \\
b_{31} & b_{32} & b_{33} &b_{34} \\
b_{41} & b_{42} & b_{43} &b_{44}\\
\end{array}
\right)\\&= \left(
\begin{array}{cccc}
a_{11}-b_{11} & a_{12}- b_{12}& a_{13}- b_{13}&a_{14}-b_{14} \\
a_{21}-b_{21} & a_{22}-b_{22} & a_{23}-ba_{23}&a_{24}-b_{24} \\
a_{31}-b_{31} & a_{32}-b_{32} & a_{33}-b_{33} &a_{34}-b_{34}\\
a_{41}-b_{41} & a_{42}-b_{42} & a_{43}-b_{43} &a_{44}-b_{44}\\
\end{array}
\right)\end{align}$$

Matrices are a powerful tool in mathematics, science and life. Matrices are everywhere and they have significant applications. For example, spreadsheet such as Excel or written a table represents a matrix. The word "matrix" is the Latin word and it means "womb". This term was introduced by J. J. Sylvester (English mathematician) in 1850.
The first need for matrices was in the studying of systems of simultaneous linear equations.

A matrix is a rectangular array of numbers, arranged in the following way
$$A=\left(
\begin{array}{cccc}
a_{11} & a_{12} & \ldots&a_{1n} \\
a_{21} & a_{22} & \ldots& a_{2n} \\
\ldots &\ldots &\ldots&\ldots \\
a_{m1} & a_{m2} & \ldots&a_{mn} \\
\end{array}
\right)=\left[
\begin{array}{cccc}
a_{11} & a_{12} & \ldots&a_{1n} \\
a_{21} & a_{22} & \ldots& a_{2n} \\
\ldots &\ldots &\ldots&\ldots \\
a_{m1} & a_{m2} & \ldots&a_{mn} \\
\end{array}
\right]$$
There are two notation of matrix: in parentheses or box brackets. The terms in the matrix are called its entries or its elements.
Matrices are most often denoted by upper-case letters, while the corresponding lower-case letters, with two subscript indices, are the elements of matrices.
For examples, matrices are denoted by $A,B,\ldots Z$ and its elements by $a_{11}$ or $a_{1,1}$, etc. The horizontal and vertical lines of entries in a matrix are called rows and columns, respectively.

The size of a matrix is a Descartes product of the number of rows and columns that it contains.
A matrix with $m$ rows and $n$ columns is called an $m\times n$ matrix. In this case $m$ and $n$ are its dimensions.
If a matrix consists of only one row, it is called a row matrix. If a matrix consists
only one column is called a column matrix. A matrix
which contains only zeros as elements is called a zero matrix.

Matrices $A$ and $B$ can be added if and only if their sizes are equal. Such matrices are called **commensurate** for addition or
subtraction. Their sum is a matrix $C=A+B$ with elements
$$c_{ij}=a_{ij}+b_{ij}$$
The matrix of sum has the same size as the matrices $A$ and $B$.
This means, each element in $C$ is equal to the sum of the elements in $A$ and $B$ that are located in corresponding places. For example,
$c_{12}=a_{12}+b_{12}$. If two matrices have different sizes, their sum is not defined.
It is easy to prove that $A+B=B+A$, in other words the addition of matrices is commutative operation.

A $4\times 4$ matrix has $4$ columns and $4$ rows. For example, the sum of two $4\times 4$ matrices $A=(a_{ij})_{4\times 4}$ and $B=(a_{ij})_{4\times 4}$ is a matrix $C=(c_{ij})_{4\times4}$ such that
$$\begin{align} C=\left(
\begin{array}{cccc}
a_{11} & a_{12} & a_{13}&a_{14} \\
a_{21} & a_{22} & a_{23}&a_{24} \\
a_{31} & a_{32} & a_{33} &a_{34}\\
a_{41} & a_{42} & a_{43} &a_{44}\\
\end{array}
\right)&+
\left(
\begin{array}{cccc}
b_{11} & b_{12} & b_{13}&b_{14} \\
b_{21} & b_{22} & b_{23}&b_{24} \\
b_{31} & b_{32} & b_{33} &b_{34}\\
b_{41} & b_{42} & b_{43} &b_{44}\\
\end{array}
\right)\\&= \left(
\begin{array}{cccc}
a_{11}+b_{11} & a_{12}+ b_{12}& a_{13}+ b_{13}&a_{14}+b_{14} \\
a_{21}+b_{21} & a_{22}+b_{22} & a_{23}+ba_{23}&a_{24}+b_{24} \\
a_{31}+b_{31} & a_{32}+b_{32} & a_{33}+b_{33} &a_{34}+b_{34}\\
a_{41}+b_{41} & a_{42}+b_{42} & a_{43}+b_{43} &a_{44}+b_{44}\\
\end{array}
\right)\end{align}$$
For example, let us find the sum for
$$A=\left(
\begin{array}{cccc}
5 & 7 & 9&10 \\
2 & 3 & 3&8 \\
8 & 10 & 2 &3\\
3 & 3 & 4 &8\\
\end{array}
\right)\quad\mbox{and}\quad B=\left(
\begin{array}{cccc}
3 & 10 & 12&18 \\
12 & 1 & 4&9 \\
9 & 10 & 12 &2\\
3 & 12 & 4 &10\\
\end{array}
\right)$$
Using the matrix addition formula, the sum of the matrices $A$ and $B$ is the matrix
$$C=A+B=\left(
\begin{array}{cccc}
5+3 & 7+10 & 9+12&10+18 \\
2+12 & 3+1 & 3+4&8+9 \\
8+9 & 10+10 & 2+12 &3+2\\
3+3 & 3+12 & 4+4 &8+10\\
\end{array}
\right)=\left(
\begin{array}{cccc}
8 & 17 & 21&28 \\
14 & 4 & 7&17\\
17 & 20 & 14 &5\\
6 & 15 & 8 &18\\
\end{array}
\right)$$

Matrices $A$ and $B$ can be subtracted if and only if their sizes are equal. The difference $A-B$ of two $m\times n$ matrices is equal to the sum $A + (-B)$,
where $-B$ represents the additive inverse of the matrix $B$. So, the difference a matrix $C=A-B$ with elements
$$c_{ij}=a_{ij}+(-b_{ij})=a_{ij}-b_{ij}$$
The matrix $C$ has the same size as the matrices $A$ and $B$.
This means, each element in $C$ is equal to the difference between the elements of $A$ and $B$ that are located in corresponding places. For example,
$c_{12}=a_{12}-b_{12}$. If two matrices have different sizes, their difference is not defined.
The subtraction of matrices is non-commutative operation, i.e $A-B\ne B-A$. Subtracting two matrices is very similar to adding matrices with the only difference being subtracting corresponding elements.

A $4\times 4$ matrix has $4$ columns and $4$ rows. For example, the difference between two $4\times 4$ matrices $A=(a_{ij})_{4\times 4}$ and $B=(a_{ij})_{4\times 4}$ is a matrix $C=(c_{ij})_{4\times4}$ such that
$$\begin{align} C=\left(
\begin{array}{cccc}
a_{11} & a_{12} & a_{13}&a_{14} \\
a_{21} & a_{22} & a_{23}&a_{24} \\
a_{31} & a_{32} & a_{33} &a_{34}\\
a_{41} & a_{42} & a_{43} &a_{44}\\
\end{array}
\right)&-
\left(
\begin{array}{cccc}
b_{11} & b_{12} & b_{13}&b_{14} \\
b_{21} & b_{22} & b_{23}&b_{24} \\
b_{31} & b_{32} & b_{33} &b_{34}\\
b_{41} & b_{42} & b_{43} &b_{44}\\
\end{array}
\right)\\&= \left(
\begin{array}{cccc}
a_{11}-b_{11} & a_{12}- b_{12}& a_{13}- b_{13}&a_{14}-b_{14} \\
a_{21}-b_{21} & a_{22}-b_{22} & a_{23}-ba_{23}&a_{24}-b_{24} \\
a_{31}-b_{31} & a_{32}-b_{32} & a_{33}-b_{33} &a_{34}-b_{34}\\
a_{41}-b_{41} & a_{42}-b_{42} & a_{43}-b_{43} &a_{44}-b_{44}\\
\end{array}
\right)\end{align}$$
For example, let us find the difference $A-B$ for
$$A=\left(
\begin{array}{cccc}
5 & 7 & 9&10 \\
2 & 3 & 3&8 \\
8 & 10 & 2 &3\\
3 & 3 & 4 &8\\
\end{array}
\right)\quad\mbox{and}\quad B=\left(
\begin{array}{cccc}
3 & 10 & 12&18 \\
12 & 1 & 4&9 \\
9 & 10 & 12 &2\\
3 & 12 & 4 &10\\
\end{array}
\right)$$
Using the matrix subtraction formula, the difference $A-B$ is the matrix
$$C=A-B=\left(
\begin{array}{cccc}
5-3 & 7-10 & 9-12&10-18 \\
2-12 & 3-1 & 3-4&8-9 \\
8-9 & 10-10 & 2-12 &3-2\\
3-3 & 3-12 & 4-4 &8-10\\
\end{array}
\right)=\left(
\begin{array}{cccc}
2 & -3 &-3&-8 \\
-10 & 2 & -1&-1\\
-1 & 0 & -10 &1\\
0 & -9 & 0 &-2\\
\end{array}
\right)$$
The $4\times 4$ matrix addition and subtraction work with steps shows the complete step-by-step calculation for
finding the sum and difference of two $4\times 4$ matrices $A$ and $B$ using the matrix addition and subtraction formulas. For
any other matrices, just supply elements of $2$ matrices whose elements are real numbers and click on the GENERATE WORK
button. The grade school students and people who study math use this 4x4 matrix addition and subtraction calculator to generate the
work, verify the results of addition and subtracting matrices derived by hand, or do their homework problems efficiently. This calculator can be of interest for solving linear equations and some other mathematical and real life lengthy problems.

In $3D$-graphics a point is represented by a $4$-component vector $(x, y, z, 1)$. On a point we can apply some transformation like translation, scaling, rotation, reflection, skewing and combination of these. These transformations can be represented by a $4\times 4$ matrix. For example, a $4\times 4$ translation matrix is represented as follows: $$\left( \begin{array}{cccc} 1 & 0 &0&x \\ 0 &1 & 0&y\\ 0 & 0 & 1 &z\\ 0 & 0 & 0 &1\\ \end{array} \right)$$

**Practice Problem 1 :**

Find the sum $A+B$ and difference $B-A$ of matrices $$A=\left(
\begin{array}{cccc}
1 & 0 &12&-7 \\
0 &1 & 0&-9\\
5 & 7 & 1 &4\\
11 & 8 & 0 &1\\
\end{array}
\right)\quad\mbox{and}\quad B=\left(
\begin{array}{cccc}
1 & 7 &0&4 \\
3 &1 & 0&5\\
12 & 11 & 1 &7\\
10 & 2 & -3 &1\\
\end{array}
\right)$$

**Practice Problem 2 :**

$$M=\left(
\begin{array}{cccc}
-31 & 10 &12&-7 \\
5 &1 & -20&-8\\
12 & -7 & 7 &7\\
1 & -8 & 4 &1\\
\end{array}
\right)\quad\mbox{and}\quad N=\left(
\begin{array}{cccc}
11 & 7 &0&4 \\
3 &13 & 0&15\\
12 &41 & 9 &9\\
10 & 2 & -13 &1\\
\end{array}
\right)$$
solve the matrix equation $M+X=2N$ for $X$.

The 4x4 matrix addition and subtraction calculator, formula, example calculation (work with steps), real world problems and practice problems would be very useful
for grade school students (K-12 education) to understand the addition and subtraction of two or more matrices. Using this concept they can be able
to solve some problems in computer graphics and other field of science.