mathpi.net

Matrix Addition Calculator

This Matrix Addition Calculator reads matrix size, then reads two matrices A and B of the specified size from user, and finds the sum of two matrices: (A + B), with step by step calculations.

Enter Matrix Size of A, B

×

Enter matrix A

The matrix appears when you enter the size: m, n.

Enter matrix B

The matrix appears when you enter the size: m, n.

How to do Matrix Addition

To perform matrix addition, follow these steps:

1. Ensure that the matrices you are given to add have the same dimensions. If so, then proceed with the next step. Else, you may say that the Matrix addition is not valid.

2. Add the corresponding elements from each matrix to form a new matrix.

Addition of 2x2 Matrices

Consider two matrices A and B of dimension 2x2:

Matrix \({\ A = \begin{bmatrix}a11 & a12\\a21 & a22\end{bmatrix} }\)

Matrix \({\ B = \begin{bmatrix}b11 & b12\\b21 & b22\end{bmatrix} }\)

The result of adding A to B is a new matrix C.

Matrix \({\ C = \begin{bmatrix}c11 & c12\\c21 & c22\end{bmatrix} = A+B = \begin{bmatrix}a11 & a12\\a21 & a22\end{bmatrix} + \begin{bmatrix}b11 & b12\\b21 & b22\end{bmatrix} }\)

where each element \({\ cij = aij + bij }\).

\({\ C = \begin{bmatrix}c11 & c12\\c21 & c22\end{bmatrix} = \begin{bmatrix}a11 + b11 & a12 + b12\\a21 + b21 & a22 + b22\end{bmatrix} }\)

The explanation holds for any other matrix dimension.

Addition of 3x3 Matrices

Consider two matrices A and B of dimension 3x3:

Matrix \({\ A = \begin{bmatrix}a11 & a12 & a13\\a21 & a22 &a23\\a31 & a32 &a33\end{bmatrix} }\)

Matrix \({\ B = \begin{bmatrix}b11 & b12 & b13\\b21 & b22 &b23\\b31 & b32 &b33\end{bmatrix} }\)

The result of adding A to B is a new matrix C.

Matrix \({\ C = \begin{bmatrix}c11 & c12 & c13\\c21 & c22 &c23\\c31 & c32 &c33\end{bmatrix} = \begin{bmatrix}a11 + b11 & a12 + b12 & a13 + b13\\a21 + b21 & a22 + b22 & a23 + b23\\a31 + b31 & a32 + b32 & a33 + b33\end{bmatrix} }\)

Solved Examples - Matrix Addition

1. Find the sum of following two matrices: A and B.

Matrix \({\ A = \begin{bmatrix}7 & 2\\3 & 1\end{bmatrix} }\)

Matrix \({\ B = \begin{bmatrix}4 & 5\\4 & 0\end{bmatrix} }\)

Solution

Given matrices are:

Matrix \({\ A = \begin{bmatrix}7 & 2\\3 & 1\end{bmatrix} }\)

Matrix \({\ B = \begin{bmatrix}4 & 5\\4 & 0\end{bmatrix} }\)

Checking if Matrix Addition is possible with Matrices A and B

Both matrix A and matrix B are of same size: 2x2. Therefore, we can do the matrix addition with these two matrices.

Calculating Addition of Matrices A and B

\({\ A + B = \begin{bmatrix}7 & 2\\3 & 1\end{bmatrix} + \begin{bmatrix}4 & 5\\4 & 0\end{bmatrix} }\)

\({\ A + B = \begin{bmatrix}7+4 & 2+5\\3+4 & 1+0\end{bmatrix} }\)

\({\ A + B = \begin{bmatrix}11 & 7\\7 & 1\end{bmatrix} }\)

Result of Matrix Addition

Therefore, the sum of the given two matrices A and B is

\({\ A + B = \begin{bmatrix}11 & 7\\7 & 1\end{bmatrix} }\)

2. Find the sum of following two matrices: A and B.

Matrix \({\ A = \begin{bmatrix}1 & 2 & 3\\4 & 5 & 6\end{bmatrix} }\)

Matrix \({\ B = \begin{bmatrix}10 & 10 & 10\\10 & 10 & 10\end{bmatrix} }\)

Solution

Given matrices are:

Matrix \({\ A = \begin{bmatrix}1 & 2 & 3\\4 & 5 & 6\end{bmatrix} }\)

Matrix \({\ B = \begin{bmatrix}10 & 10 & 10\\10 & 10 & 10\end{bmatrix} }\)

Checking if Matrix Addition is possible with Matrices A and B

Both matrix A and matrix B are of same size: 2x3. Therefore, we can do the matrix addition with these two matrices.

Calculating Addition of Matrices A and B

\({\ A + B = \begin{bmatrix}1 & 2 & 3\\4 & 5 & 6\end{bmatrix} + \begin{bmatrix}10 & 10 & 10\\10 & 10 & 10\end{bmatrix} }\)

\({\ A + B = \begin{bmatrix}1+10 & 2+10 & 3+10\\4+10 & 5+10 & 6+10\end{bmatrix} }\)

\({\ A + B = \begin{bmatrix}11 & 12 & 13\\14 & 15 & 16\end{bmatrix} }\)

Result of Matrix Addition

Therefore, the sum of the given two matrices A and B is

\({\ A + B = \begin{bmatrix}11 & 12 & 13\\14 & 15 & 16\end{bmatrix} }\)

3. Find the sum of following two matrices: A and B.

Matrix \({\ A = \begin{bmatrix}1 & 2\\4 & 5\end{bmatrix} }\)

Matrix \({\ B = \begin{bmatrix}10 & 10 & 10\\10 & 10 & 10\end{bmatrix} }\)

Solution

Given matrices are:

Matrix \({\ A = \begin{bmatrix}1 & 2\\4 & 5 \end{bmatrix} }\)

Matrix \({\ B = \begin{bmatrix}10 & 10 & 10\\10 & 10 & 10\end{bmatrix} }\)

Checking if Matrix Addition is possible with Matrices A and B

Matrix A is of size 2x2, and matrix B is of same size: 2x3.

The given two matrices are of different size.

The condition for the two matrices to be of same size is not met, and the Matrix addition cannot be done for given matrices.