Matrix Addition and Subtraction Calculator
Select the dimensions of the matrices and enter the elements to calculate their addition or subtraction step by step.
Quick Examples
How to Use the Calculator
This online matrix addition and subtraction solver is a linear algebra tool designed to operate on matrix arrays. Besides giving you the resulting matrix, the system generates the step-by-step solution so you can understand the arithmetic interaction between the elements.
Setup and data entry:
- Select the operation: Use the main menu to tell the calculator which calculation you want to perform, whether it is matrix addition (A + B) or subtraction (A - B).
- Define the dimensions: Adjust the numeric row and column selectors to set the size of your exercise. Since by mathematical definition two matrices can only be added or subtracted if they have the same dimensions (identical number of rows and columns), the size you choose here will apply simultaneously to matrix A and matrix B.
- Enter the elements: Fill in the cells of both grids with your numerical values. To speed up data entry, the system features a smart autocomplete: if you leave spaces or partially empty cells, the math engine will directly interpret them as zeros (0).
Once the exercise is set up, the algorithm will process the information and structure the answer into two main sections:
1. Quick answer
In the first highlighted block on the screen, you will immediately find the resulting matrix with the completed operation. This box is ideal if all you need is to check the final solution to your problem.
2. Step-by-step solution
Right below the main result, the analytical development of the operation will be displayed. The system will show you the correspondence between elements in the same position (aij ± bij). To do this, it will generate an intermediate matrix where you can see the unresolved operation inside each cell. After this logical step, you will see the arithmetic simplification of each term leading to the final matrix.
Solved Exercises
The following are examples of problems solved by the calculator.
Exercise 1
Add the following 2x2 matrices:
$$ \displaystyle A = \begin{bmatrix} 2 & 4 \\[0.8em] -1 & 3 \end{bmatrix} \quad B = \begin{bmatrix} 1 & 0 \\[0.8em] 5 & -2 \end{bmatrix} $$
Result
The result of adding matrices A and B is:
Step-by-step solution
To add two matrices, we add each element of the first matrix to the element in the same position in the second matrix.
Exercise 2
Calculate the subtraction of the following 2x2 matrices:
$$ \displaystyle A = \begin{bmatrix} 5 & -2 \\[0.8em] 1 & 0 \end{bmatrix} \quad B = \begin{bmatrix} 3 & 1 \\[0.8em] -4 & 2 \end{bmatrix} $$
Result
Performing the subtraction of A minus B yields:
Step-by-step solution
In matrix subtraction, the corresponding value located in the same row and column of matrix B is subtracted from each entry of matrix A.
Exercise 3
Find the sum of the following 2x3 matrices:
$$ \displaystyle A = \begin{bmatrix} 1 & 2 & 3 \\[0.8em] 4 & 5 & 6 \end{bmatrix} \quad B = \begin{bmatrix} 6 & 5 & 4 \\[0.8em] 3 & 2 & 1 \end{bmatrix} $$
Result
The resulting matrix from adding A and B is:
Step-by-step solution
To perform the addition, we combine the corresponding components of both matrices through a term-by-term sum.
Exercise 4
Determine the difference between the following 2x3 matrices:
$$ \displaystyle A = \begin{bmatrix} 0 & -3 & 2 \\[0.8em] 7 & 1 & -1 \end{bmatrix} \quad B = \begin{bmatrix} 2 & 1 & -1 \\[0.8em] 4 & 0 & 3 \end{bmatrix} $$
Result
Calculating the difference A - B results in:
Step-by-step solution
To subtract matrices of the same dimensions, we calculate the difference component by component in each of their positions.
Exercise 5
Obtain the sum of the following 3x3 matrices:
$$ \displaystyle A = \begin{bmatrix} \frac{1}{2} & 0 & 3 \\[0.8em] -1 & \frac{2}{3} & 4 \\[0.8em] 0 & -5 & 1 \end{bmatrix} \quad B = \begin{bmatrix} \frac{1}{2} & 1 & -2 \\[0.8em] 2 & \frac{1}{3} & -3 \\[0.8em] 1 & 4 & 0 \end{bmatrix} $$
Result
The final sum of matrices A and B is equivalent to:
Step-by-step solution
It is solved by independently adding the values of each respective cell in matrix A with those of matrix B.
Exercise 6
Find the result of adding the following 1x4 row matrices:
$$ \displaystyle A = \begin{bmatrix} 1 & -2 & 3 & -4 \end{bmatrix} \quad B = \begin{bmatrix} -1 & 2 & -3 & 4 \end{bmatrix} $$
Result
The result obtained after performing the operation is:
Step-by-step solution
We add term by term the corresponding elements located along each of the columns of both row matrices.
