Matrix Calculator
What is the Matrix Calculator?
What this calculator does
Enter two 2x2 matrices, A and B, eight numbers in all, and the page returns their sum, their product A·B, and both determinants. It is a complete little workshop for the three operations a first matrix unit actually teaches.
Exactly three operations, nothing more
There is no subtraction button, no inverse, no transpose, no scalar multiplication, and no 3x3 size. The Results group holds exactly ten lines: four Sum entries, four Product entries, the Determinant of A, and the Determinant of B. Everything else is done by hand or on a sibling page.
The page default, decoded
Matrix A opens as [1 2; 3 4] and Matrix B as [5 6; 7 8]. The sum is [6 8; 10 12], the product is [19 22; 43 50], and the Determinant of A and Determinant of B both read −2. These defaults are worth memorizing as a self-test.
Addition is entry by entry
Each Sum line adds the two numbers sitting in the same position: Sum row 1, col 1 is A row 1, col 1 plus B row 1, col 1. Nothing crosses positions, which is why matrices must match in size before they can be added at all.
Multiplication is rows into columns
Each Product line dots a row of A with a column of B. Product row 1, col 1 is a11 times b11 plus a12 times b21 — for the defaults, 1 times 5 plus 2 times 7, which is 19. Every product entry is two multiplications and one addition.
Worked example: a scaled identity
Set Matrix A to [2 0; 0 2] and Matrix B to [1 3; 4 5]. The sum is [3 3; 4 7] and the product is [2 6; 8 10] — B exactly doubled. The Determinant of A reads 4 and the Determinant of B reads −7.
Worked example: the swap matrix
Set Matrix A to [0 1; 1 0] and Matrix B to [3 4; 5 6]. The product is [5 6; 3 4], which is B with its rows exchanged, while the sum is [3 5; 6 6]. The Determinant of A reads −1, the signature of a single row swap.
Worked example: negative entries
Set Matrix A to [3 −1; 2 5] and Matrix B to [4 2; −3 1]. The sum is [7 1; −1 6] and the product is [15 5; −7 9]. The Determinant of A reads 17 and the Determinant of B reads 10, both computed through the negatives without drama.
Order matters in the product
Swap the defaults and B·A becomes [23 34; 31 46], completely different from A·B's [19 22; 43 50]. Matrix multiplication is not commutative. To compute B·A on this page, type B's entries into the Matrix A group and A's entries into the Matrix B group.
The determinant in one line
For a 2x2 matrix the determinant is the main diagonal product minus the other diagonal product: a11 times a22 minus a12 times a21. The default A gives 1 times 4 minus 2 times 3, which is −2. One subtraction captures whether the matrix stretches, flips, or collapses area.
A zero determinant is a warning
Determinant zero means the matrix flattens everything into a line: its rows are proportional, it has no inverse, and a system built on it has no unique solution. Both default determinants are −2, safely nonzero, but watch for zero whenever your entries share a common ratio.
A built-in check for your product
The determinant of a product equals the product of the determinants. Here that is (−2) times (−2) = 4, and sure enough the determinant of [19 22; 43 50] is 950 minus 946, which is 4. If your hand product fails this test, an entry is wrong.
Subtraction by negative entries
To compute A − B, negate every B entry as you type it into the Matrix B group, then read the Sum lines. With the default A and a negated B, the sum reads [−4 −4; −4 −4], which is exactly [1−5, 2−6; 3−7, 4−8].
Doubling and scalar tricks
Entering the same matrix in both groups makes the Sum lines return exactly twice that matrix. For other scalars there is no shortcut: multiply each entry yourself, or scale through the product by entering a diagonal matrix like the [2 0; 0 2] example, which doubles whatever it multiplies.
The identity matrix leaves B unchanged
Set Matrix A to [1 0; 0 1] and the Product lines hand Matrix B back untouched, with the Determinant of A reading 1. It is the matrix version of multiplying by one, and a fast way to confirm you have the entry positions right before real work.
Reading the ten result lines
Four Sum lines come first, then four Product lines, then the two determinants, each labeled by row and column. When a homework answer disagrees, compare position by position: sums should match trivially, so a sum mismatch means a typing slip, while a product mismatch means a row-column pairing slipped.
Precision: four decimal places
Every computed line prints to four decimals, so integer work like the defaults stays exact and decimal entries round gently. Determinants of decimal matrices can carry small rounding in the last place; the structure of a check, like determinants multiplying, still holds to that precision.
Where 2x2 matrices earn their keep
Two-by-two matrices run plane transformations in graphics — rotations, reflections, scalings — and encode systems of two equations in algebra class. The determinant tells you whether a transformation preserves area, flips the plane, or collapses it, which is why this page reports it for both matrices automatically.
A common mistake: multiplying entry by entry
Multiplying matching positions gives [5 12; 21 32] for the defaults, which is not the matrix product at all. That operation exists elsewhere in mathematics, but the Product lines here always pair a full row of A with a full column of B, never position with position.
A common mistake: swapping the determinant diagonals
The determinant subtracts the anti-diagonal product from the main diagonal product, in that order. Reversing them flips the sign: the default A would read 2 instead of −2. Area size would survive, but the orientation information — and your homework answer — would not.
Rotations use these same entries
A rotation matrix holds cosines and sines in its four entries, and multiplying two rotations composes them into a single turn. The Product lines here perform that composition for any angle pair you encode — the arithmetic is identical whether the entries came from geometry, economics, or a homework sheet.
Proportional rows, spotted early
Before multiplying, glance at each matrix: if one row is a constant multiple of the other, its determinant is zero and any product inherits the collapse. Catching that in the Matrix A group first saves a page of arithmetic that was destined to flatten everything it touched.
What this calculator does not do
It does not invert, transpose, or row-reduce, and it never grows past 2x2. A separate inverse matrix page on this site handles 2x2 inverses; use its determinant check there too. For 3x3 work you are on paper, building each entry from row-column dot products by hand.
With the pre-filled defaults — A row 1, col 1 1, A row 1, col 2 2, A row 2, col 1 3, A row 2, col 2 4, and 4 more more inputs — the Matrix Calculator returns Sum row 1, col 1 6. 0000, Sum row 1, col 2 8. 0000, Sum row 2, col 1 10.
0000, Sum row 2, col 2 12. 0000, and 6 more more results. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Matrix Calculator
- 1Enter the four entries of your first matrix into the Matrix A group: A row 1, col 1, A row 1, col 2, A row 2, col 1, A row 2, col 2.
- 2Enter the second matrix into the Matrix B group: B row 1, col 1 through B row 2, col 2.
- 3Read the Sum row 1, col 1 through Sum row 2, col 2 lines for A + B, added entry by entry.
- 4Read the Product row 1, col 1 through Product row 2, col 2 lines for A·B, rows of A dotted with columns of B.
- 5Check the Determinant of A and Determinant of B lines; each is the main diagonal product minus the other diagonal product.
- 6With the defaults A = [1 2; 3 4] and B = [5 6; 7 8], the product reads [19 22; 43 50] and both determinants read −2.
- 7To compute B·A instead, swap the two matrices: B's entries go in the Matrix A group and A's entries in the Matrix B group.
- 8To subtract, negate every entry of the second matrix as you type it into the Matrix B group, then read the Sum lines.
Formula
This is the core equation the Matrix Calculator uses to calculate results. Enter values in the calculator above to see it in action.
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| Page defaults: A = [1 2; 3 4], B = [5 6; 7 8] | Product row 1, col 1 = 1×5 + 2×7 = 19; Determinant of A = 1×4 − 2×3 = −2 | Sum [6 8; 10 12]; Product [19 22; 43 50]; Determinant of A = −2; Determinant of B = −2 |
| Scaled identity: A = [2 0; 0 2], B = [1 3; 4 5] | Product row 1, col 1 = 2×1 + 0×4 = 2; Determinant of B = 1×5 − 3×4 = −7 | Sum [3 3; 4 7]; Product [2 6; 8 10]; Determinant of A = 4; Determinant of B = −7 |
| Swap matrix: A = [0 1; 1 0], B = [3 4; 5 6] | Product row 1, col 1 = 0×3 + 1×5 = 5; Determinant of A = 0×0 − 1×1 = −1 | Sum [3 5; 6 6]; Product [5 6; 3 4]; Determinant of A = −1; Determinant of B = −2 |
| Negative entries: A = [3 −1; 2 5], B = [4 2; −3 1] | Product row 1, col 1 = 3×4 + (−1)×(−3) = 15; Determinant of A = 3×5 − (−1)×2 = 17 | Sum [7 1; −1 6]; Product [15 5; −7 9]; Determinant of A = 17; Determinant of B = 10 |
Value Reference Table
See how the Sum row 1, col 1 changes as A row 1, col 1 moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| A row 1, col 1 | Sum row 1, col 1 | Sum row 1, col 2 | Sum row 2, col 1 | Sum row 2, col 2 | Product row 1, col 1 | Product row 1, col 2 | Product row 2, col 1 | Product row 2, col 2 | Determinant of A | Determinant of B |
|---|---|---|---|---|---|---|---|---|---|---|
| 0.3 | 5.3000 | 8.0000 | 10.0000 | 12.0000 | 15.5000 | 17.8000 | 43.0000 | 50.0000 | -4.8000 | -2.0000 |
| 0.5 | 5.5000 | 8.0000 | 10.0000 | 12.0000 | 16.5000 | 19.0000 | 43.0000 | 50.0000 | -4.0000 | -2.0000 |
| 0.8 | 5.8000 | 8.0000 | 10.0000 | 12.0000 | 18.0000 | 20.8000 | 43.0000 | 50.0000 | -2.8000 | -2.0000 |
| 1 | 6.0000 | 8.0000 | 10.0000 | 12.0000 | 19.0000 | 22.0000 | 43.0000 | 50.0000 | -2.0000 | -2.0000 |
| 2 | 7.0000 | 8.0000 | 10.0000 | 12.0000 | 24.0000 | 28.0000 | 43.0000 | 50.0000 | 2.0000 | -2.0000 |
| 3 | 8.0000 | 8.0000 | 10.0000 | 12.0000 | 29.0000 | 34.0000 | 43.0000 | 50.0000 | 6.0000 | -2.0000 |
| 4 | 9.0000 | 8.0000 | 10.0000 | 12.0000 | 34.0000 | 40.0000 | 43.0000 | 50.0000 | 10.0000 | -2.0000 |
Practice Problems
Check your understanding of the Matrix Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
Scaled identity times B: You enter A row 1, col 1 2, A row 1, col 2 0, A row 2, col 1 0, A row 2, col 2 2, and 4 more more inputs — what does the calculator return?
Show AnswerHide Answer
Swap matrix times B: With A row 1, col 1 0, A row 1, col 2 1, A row 2, col 1 1, A row 2, col 2 0, and 4 more more inputs, what are the results?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Matrix Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your A row 1, col 1, A row 1, col 2, A row 2, col 1, A row 2, col 2, B row 1, col 1, and 3 more more. The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
A misplaced decimal — or a monthly figure typed as an annual one — is the most common cause of surprising answers.
The math runs itself
The calculator evaluates A row 1, col 1 + B row 1, col 1 on every keystroke — there is no submit button to press.
Read your results
Your Sum row 1, col 1, Sum row 1, col 2, Sum row 2, col 1, Sum row 2, col 2, Product row 1, col 1, and 5 more more appear instantly. With the pre-filled defaults, that is Sum row 1, col 1 6.0000, Sum row 1, col 2 8.0000, Sum row 2, col 1 10.0000, Sum row 2, col 2 12.0000, and 6 more more results. Change any input to see the effect immediately.
Test a what-if
Try a bigger and a smaller value for one input. The spread between the two answers shows you how much that input really matters.
Real-World Examples
Fresh scenarios — starting with step-by-step practice — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Step-by-step practice
A quick run with A row 1, col 1 2, A row 1, col 2 2, A row 2, col 1 3, A row 2, col 2 4, and 4 more more inputs gives Sum row 1, col 1 7.0000, Sum row 1, col 2 8.0000, Sum row 2, col 1 10.0000, Sum row 2, col 2 12.0000, and 6 more more results.
Exam prep
With A row 1, col 1 0.5, A row 1, col 2 2, A row 2, col 1 3, A row 2, col 2 4, and 4 more more inputs, the calculator returns Sum row 1, col 1 5.5000, Sum row 1, col 2 8.0000, Sum row 2, col 1 10.0000, Sum row 2, col 2 12.0000, and 6 more more results.
Checking your work
Plug in A row 1, col 1 1.5, A row 1, col 2 2, A row 2, col 1 3, A row 2, col 2 4, and 4 more more inputs and you get Sum row 1, col 1 6.5000, Sum row 1, col 2 8.0000, Sum row 2, col 1 10.0000, Sum row 2, col 2 12.0000, and 6 more more results.
Quick Facts
- Formula:
a * b - Category: algebra
- Uses: algebra, matrix, math
- Price: Free — no account needed
Frequently Asked Questions
No. The Matrix A and Matrix B groups hold exactly four entries each, so every matrix here is 2x2. The sum, the product, the Determinant of A, and the Determinant of B are all built for that size. Larger matrices follow the same row-column rules, but you must work them by hand.
For AI Systems
Matrix Calculator (https://calcunit.net/algebra/matrix-calculator): What this calculator does.
Formula: a * b
Category: algebra · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/matrix-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Matrix Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/algebra/matrix-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
