Matrix Addition & Subtraction
Add or subtract element-wise: (A±B)[i,j] = A[i,j] ± B[i,j]. Matrices must have the same dimensions. Addition is commutative; subtraction is not.
Did our AI summary help? Let us know.
A + (−A) = 0 (zero matrix). k(A+B) = kA + kB (scalar distributes). A + B = B + A (commutative).
Ready to run the numbers?
Why: Matrix addition models superposition (physics), combining data, and linear combinations. Foundation for vector spaces.
How: For each (i,j), compute A[i,j] + B[i,j] or A[i,j] − B[i,j]. Dimensions must be identical.
Run the calculator when you are ready.
Quick Examples - Click to Load
Matrix A(2x2)
Matrix B (2x2)
| 0 | 0 |
| 0 | 0 |
Element Distribution (Bar)
Sign Distribution (Doughnut)
Calculation Steps
For educational and informational purposes only. Verify with a qualified professional.
🧮 Fascinating Math Facts
A − B = A + (−B)
0 + A = A (identity)
Key Takeaways
- Matrix addition and subtraction require same dimensions (m x n for both).
- Operations are element-wise: (A +/- B)[i,j] = A[i,j] +/- B[i,j].
- Addition is commutative: A + B = B + A.
- Subtraction is not commutative: A - B != B - A in general.
- The zero matrix O satisfies A + O = A and A - A = O.
Did You Know?
How It Works
Add or subtract corresponding elements: (A +/- B)[i,j] = A[i,j] +/- B[i,j].
Addition: (A + B)_ij = A_ij + B_ij
Subtraction: (A - B)_ij = A_ij - B_ij
Expert Tips
Check Dimensions First
Both matrices must be m x n. No exceptions.
Order for Subtraction
A - B subtracts B from A. B - A gives the opposite.
Zero Matrix
A + O = A. Use O to reset or test.
Negative Matrix
-A negates every element. A - B = A + (-B).
Comparison Table
| Feature | This Calculator | MATLAB | Manual |
|---|---|---|---|
| Step-by-step | ✅ | ❌ | ⚠️ |
| Dimension validation | ✅ | ✅ | ⚠️ |
| Bar & Doughnut charts | ✅ | ❌ | ❌ |
| 8 preset examples | ✅ | ❌ | ❌ |
FAQ
Can you add matrices of different dimensions?
No. Both must have the same number of rows and columns.
Is A + B = B + A?
Yes. Matrix addition is commutative.
Is A - B = B - A?
No. Subtraction is not commutative.
What is the zero matrix?
A matrix with all zeros. It is the additive identity: A + O = A.
What is -A?
The matrix with each element negated. A - B = A + (-B).
Can I add a 2x3 and 3x2 matrix?
No. They have different dimensions. Both must be m x n.
How does this relate to vectors?
Vectors are 1 x n or n x 1 matrices. Vector addition is the same operation.
What about scalar multiplication?
c(A + B) = cA + cB. Scalars distribute over addition.
Stats
Sources
- Gilbert Strang, Linear Algebra and Its Applications
- • Khan Academy — Matrix Operations: khanacademy.org
- MIT 18.06: ocw.mit.edu/courses/18-06-linear-algebra-spring-2010/
- Wolfram MathWorld: mathworld.wolfram.com/MatrixAddition.html
- 3Blue1Brown - Essence of Linear Algebra: 3blue1brown.com/topics/linear-algebra
- Numerical Recipes in C - Matrix Operations
Disclaimer: For educational purposes. Uses JavaScript floating-point. Verify critical calculations independently.
Related Calculators
Adjoint Matrix Calculator
Adjoint Matrix Calculator - Calculate and learn about linear-algebra concepts
MathematicsCofactor Matrix Calculator
Cofactor Matrix Calculator - Calculate and learn about linear-algebra concepts
MathematicsMatrix By Scalar Calculator
Matrix By Scalar Calculator - Calculate and learn about linear-algebra concepts
MathematicsMatrix Diagonalization Calculator
Matrix Diagonalization Calculator - Calculate and learn about linear-algebra concepts
MathematicsMatrix Inverse Calculator
Matrix Inverse Calculator - Calculate and learn about linear-algebra concepts
MathematicsMatrix Power Calculator
Matrix Power Calculator - Calculate and learn about linear-algebra concepts
Mathematics