Math

Matrix Calculator

Add or multiply two rectangular matrices. Enter one row per line, with values separated by commas or spaces, so the rows and columns remain clear.

01

Your inputs

02

Your result

Ready when you are.

Adjust the inputs, then calculate to see your result here.

Calculated on your device. Inputs are not saved by this calculator.

GET MORE FROM YOUR RESULT

Using the Matrix Calculator

Addition requires both matrices to have the same dimensions. Multiplication requires the number of columns in A to equal the number of rows in B. The output then has A’s row count and B’s column count.

Worked example

Use the example inputs below to reproduce this result. These are the form's starting values, not recommended targets. Changing your inputs updates your result above; this worked example stays fixed for comparison. Results are rounded for display.

Example inputs

Matrix A (rows on separate lines)
1, 2 3, 4
Matrix B (rows on separate lines)
5, 6 7, 8
Operation
Add

Example result

Matrix
6 8 10 12

Method and assumptions

Addition is element-wise. Multiplication takes row–column dot products.

Check the answer in the original problem

After solving, substitute the result into the original equation or relationship where possible. This can catch a sign error or a coefficient entered in the wrong position. Keep the exact inputs available when comparing with another tool, since changing a coefficient or rounding an intermediate value can change the problem being solved.

Common question

Why does A × B differ from B × A?

The row–column combinations change when the order changes. Matrix multiplication is generally not commutative, even when both products are defined.