Skip to content

Addition of Two Matrices Calculator

Updated:

Add two matrices of the same size (2×2 or 3×3) by entering their elements. The calculator sums corresponding entries and displays the resulting matrix instantly.

Matrix Addition Solver

Input Fields
Матрица A
Матрица B
If enabled, the result will update automatically when you change any value.

Matrix Addition Formula

Formula
\[ C = A + B = \begin{bmatrix} a_{11} + b_{11} & a_{12} + b_{12} & \cdots & a_{1n} + b_{1n} \\ a_{21} + b_{21} & a_{22} + b_{22} & \cdots & a_{2n} + b_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} + b_{m1} & a_{m2} + b_{m2} & \cdots & a_{mn} + b_{mn} \end{bmatrix} \]

Where:

  • \(A\) and \(B\) — matrices of identical size \(m \times n\)
  • \(C\) — the resulting matrix of the same size \(m \times n\)
  • \(a_{ij}\), \(b_{ij}\) — the elements in row \(i\), column \(j\) of matrices \(A\) and \(B\)

Each element of the result is the sum of the corresponding elements of the two matrices: \(c_{ij} = a_{ij} + b_{ij}\).

Addition of Two Matrices – Calculation Example

Example: add a 3×3 matrix \(A\) to the identity matrix \(B\), using the calculator's default values.

\[ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \]

\[ C = A + B = \begin{bmatrix} 1+1 & 2+0 & 3+0 \\ 4+0 & 5+1 & 6+0 \\ 7+0 & 8+0 & 9+1 \end{bmatrix} = \begin{bmatrix} 2 & 2 & 3 \\ 4 & 6 & 6 \\ 7 & 8 & 10 \end{bmatrix} \]

Result: the sum of the two matrices is \(C = \begin{bmatrix} 2 & 2 & 3 \\ 4 & 6 & 6 \\ 7 & 8 & 10 \end{bmatrix}\). Notice how adding the identity matrix leaves every element of \(A\) unchanged except the diagonal entries, which each increase by 1.

How to use the calculator

  1. Choose the Matrix size — either 2 × 2 or 3 × 3 — from the dropdown at the top. Both matrices must have the same size.
  2. Enter the elements of Matrix A in the fields \(a_{11}, a_{12}, \ldots\). Each subscript shows the row and column of the element (for example, \(a_{21}\) is row 2, column 1).
  3. Enter the elements of Matrix B in the same way, using the fields \(b_{11}, b_{12}, \ldots\).
  4. The result appears immediately: a table showing the matrix \(C = A + B\) with the sums of corresponding elements. Values are rounded to two decimal places.

What is matrix addition?

Matrix addition is one of the simplest operations in linear algebra. To add two matrices, you add their corresponding elements — the entry in row \(i\), column \(j\) of the result equals the sum of the entries in the same position of the two original matrices. The operation is defined only for matrices of identical dimensions: a 2×2 matrix can be added to a 2×2 matrix, but not to a 3×3 one, because there would be elements with no counterpart to add.

Unlike matrix multiplication, which is order-dependent and far more involved, addition works element by element and behaves much like ordinary addition of numbers. That makes it a natural starting point when learning matrix operations, and it is used constantly in applied work: summing forces or displacements in physics and engineering, combining pixel data in image processing, accumulating weights in machine learning, and aggregating tables of values in economics and statistics.

The interpretation of the result is straightforward: each element of \(C\) describes the combined effect of the corresponding elements of \(A\) and \(B\). For example, if two matrices record the monthly sales of different products in two stores, their sum gives the combined sales across both stores. Adding the identity matrix, as in the example above, leaves all off-diagonal elements unchanged and increases each diagonal element by 1.

Properties of matrix addition

Matrix addition satisfies the same familiar rules as addition of real numbers:

  • Commutativity: \(A + B = B + A\) — the order of the matrices does not matter.
  • Associativity: \((A + B) + C = A + (B + C)\) — grouping does not affect the result.
  • Identity element: \(A + O = A\), where \(O\) is the zero matrix of the same size.
  • Inverse element: \(A + (-A) = O\), where \(-A\) has every element of \(A\) with the opposite sign.

Keep in mind that these properties apply to addition, not to multiplication: in general \(AB \neq BA\), and \(A + B\) has no direct analogue in multiplication. If you need the product of two matrices, use the Matrix Multiplication calculator; for the difference of two matrices, see the Subtraction of Two Matrices calculator.

Assumptions and limitations

  • Equal dimensions required. The calculator only adds matrices of the same size. Matrices of different dimensions cannot be added by definition.
  • Supported sizes. Only 2 × 2 and 3 × 3 matrices are supported. For larger matrices, the same element-by-element rule applies, but you would need a more general tool.
  • Numeric entries. All elements must be numbers (integers or decimals). Fractional values should be converted to decimal form before entry.
  • Rounding. Results are displayed rounded to two decimal places, which is sufficient for most coursework and practical applications.
  • Determinants do not add. In general, \(\det(A + B) \neq \det(A) + \det(B)\). If you need the determinant of the resulting matrix or want to compare with Sum of Determinants, compute it from the final matrix, not from the individual ones.

Practical tips

  • Double-check that you have entered elements in the correct positions — row first, then column. A common mistake is transposing an element, e.g. entering \(a_{21}\) in the \(a_{12}\) field.
  • Use the result to verify hand calculations: compute one or two elements yourself and compare them with the calculator's output.
  • For related operations, you may also find the Inverse Matrix 3×3 and Rank of 3×3 Matrix calculators useful when analyzing the resulting matrix further.

Frequently Asked Questions

How do I add two matrices by hand?

Write the two matrices side by side and add each pair of entries that occupy the same position. The entry in row \(i\), column \(j\) of the result is \(c_{ij} = a_{ij} + b_{ij}\). Work through the matrix cell by cell — first row left to right, then the next row, and so on. There is no carrying between cells and no interaction between different positions, so you can check your work by spot-checking any single element.

Can I add matrices of different sizes, like a 2×2 and a 2×3?

No. Matrix addition is only defined for matrices with identical dimensions, because every element needs a counterpart in the other matrix. A 2×2 matrix has 4 entries while a 2×3 has 6, so two elements of the larger matrix would have nothing to add. If your matrices differ in size, double-check the problem statement — you may actually be asked to multiply them, which does allow certain mismatched dimensions such as a 2×3 times a 3×2.

Is matrix addition the same as matrix multiplication?

No, they are completely different operations. Addition combines corresponding entries element by element, while multiplication computes each result entry from entire rows and columns using sums of products. Addition is commutative (\(A + B = B + A\)), but multiplication generally is not (\(AB \neq BA\)). A frequent mistake is trying to "multiply" two matrices by multiplying their corresponding elements — that is a different operation known as the Hadamard (element-wise) product.

What happens if one of the matrices contains negative numbers or zeros?

Nothing special — the rule stays the same. Zeros simply leave the corresponding element of the other matrix unchanged, and negative numbers are added with their sign, so \(5 + (-3) = 2\) and \(-4 + 1 = -3\). Adding the negative matrix \(-A\) to \(A\) gives the zero matrix, which is why \(-A\) is called the additive inverse of \(A\). The calculator handles negative decimals as well as positive ones.

Does adding two matrices add their determinants?

No, and this is a very common misconception. In general, \(\det(A + B) \neq \det(A) + \det(B)\). For example, two matrices can each have a nonzero determinant while their sum has a determinant of zero. If you need the determinant of the sum, first add the matrices and then compute the determinant of the resulting matrix — never try to shortcut by adding the individual determinants.

Can I add more than two matrices together?

Yes, as long as all of them have the same dimensions. Because addition is associative, \((A + B) + C = A + (B + C)\), you can add them in any order or all at once: each element of the result is the sum of the elements in that same position across all the matrices. With this calculator, add two matrices first, then enter the result as matrix A along with the third matrix as B, and repeat for further matrices.

Why does adding the identity matrix only change the diagonal?

The identity matrix has 1s on the main diagonal and 0s everywhere else. Since zeros leave the other matrix's entries unchanged, only the diagonal positions gain 1. This is a handy trick in linear algebra: \(A + I\) shifts every eigenvalue of \(A\) up by one without changing the eigenvectors, and it appears frequently when working with characteristic polynomials and matrix equations.

Leave a Reply

Your email address will not be published. Required fields are marked *