Mathematics
Exact rational matrix arithmetic
Add, subtract or multiply rational matrices up to 4×4, scale them or transpose them, with exact fractions and a separately rounded result.
The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. JSON, HTML and TXT downloads keep your inputs and all result rows, with exact values where available. Automatic recalculation after editing is off unless you switch it on. Nothing is saved, imported or sent automatically.
Result
Formula / calculation:
Rational entries (decimal point/comma, fraction or scientific notation), each input≤400 characters and at most 4 rows/4 columns. Semicolon separates columns; | separates rows. Exact fractions; decimal display rounded 0–12 places. Each result row, including row-operation log,≤500 characters; larger expanded results refuse. Addition requires equal dimensions; multiplication requires matching inner dimensions. Order is explicit. No eigenvalues, QR approximation or numerology.
Decimal results are approximate. Inputs stay in this browser tab.
How it works
Exact rational entries, semicolon columns and vertical-bar rows; matrix arithmetic and exact Gauss–Jordan elimination. Rational entries (decimal point/comma, fraction or scientific notation), each input≤400 characters and at most 4 rows/4 columns. Semicolon separates columns; | separates rows. Exact fractions; decimal display rounded 0–12 places. Each result row, including row-operation log,≤500 characters; larger expanded results refuse. Addition requires equal dimensions; multiplication requires matching inner dimensions. Order is explicit. No eigenvalues, QR approximation or numerology.
Worked example
With these example values the calculator gives the result below. You can change any value in the form above.
Inputs
- Matrix A:
- 1;2|3;4
- Operation
- Multiply A·B
- Matrix B:
- 0;1|1;0
- Rounded display 0–12 places
- 6
Result
- Dimensions of A
- 2×2
- A (exact)
- 1; 2 | 3; 4
- Dimensions of B
- 2×2
- B / b (exact)
- 0; 1 | 1; 0
- Result dimensions
- 2×2
- Result (exact)
- 2; 1 | 4; 3
- Result (rounded)
- 2.000000; 1.000000 | 4.000000; 3.000000
Frequently asked questions
How do I multiply two matrices exactly?
Enter matrices A and B and choose multiply AB. The editable example multiplies A = 1;2|3;4 by B = 0;1|1;0. Results are exact fractions with rounded decimals separately.
How do I enter a matrix?
Use a semicolon to separate columns and a vertical bar to separate rows. Entries can be decimals, fractions or scientific notation, with at most 4 rows and 4 columns and 400 characters.
What operations are available?
You can add, subtract or multiply small rational matrices in the selected order, scale entries or transpose rows and columns.
What dimension rules apply?
Addition requires equal dimensions and multiplication requires matching inner dimensions. The order of multiplication is explicit.
Can I paste from a spreadsheet?
Yes. Paste up to 4 rows and 4 columns separated by tabs and line breaks, maximum 400 characters, and apply it to one matrix field.
Does this tool compute eigenvalues?
No. There are no eigenvalues or QR approximation in this tool.