CalcCafe

Matrix Calculator

Perform core matrix operations on 2x2 and 3x3 matrices entirely in your browser.

Result A + B
-
Operation
-
Result size
-

Enter exactly NxN numbers per matrix for the chosen size. Multiplication uses standard row-by-column dot products.

Example

Multiply two 2x2 matrices A x B:

A = [1 2; 3 4]  B = [5 6; 7 8]

A x B = [ (1*5+2*7) (1*6+2*8) ]  = [19 22]
    [ (3*5+4*7) (3*6+4*8) ]   [43 50]

Determinant of A = 1*4 - 2*3 = -2.

How it works

Pick a size and operation, type values into the grid cells, and the result matrix (or scalar) updates instantly. Determinant and transpose use only Matrix A.

Good to know

This Matrix Calculator handles the core operations on square 2x2 and 3x3 matrices: adding or subtracting two matrices, multiplying them, and finding the determinant or transpose of a single matrix. You type each matrix as rows of numbers (one row per line, values separated by spaces or commas) and the result updates live as you edit, with no button to press. It is aimed at students working through linear algebra homework, anyone checking a hand-worked answer, and people who just need a quick numeric result without installing software.

Reach for it when you want to verify a multiplication you did by hand, sanity-check whether a 3x3 matrix is invertible (a determinant of zero means it is not), or quickly transpose a matrix before plugging it into a larger calculation. Because it runs entirely in your browser, it is also handy when you are offline or working with numbers you would rather not paste into a remote service.

Read the output by starting with the "Result size" stat: addition, subtraction, multiplication, and transpose all return another matrix (shown both in the table and as a bracketed list), while the determinant returns a single scalar. Results are rounded to six decimal places, so a value like 1.9999999 from messy decimal inputs will display as 2, and a computed negative zero is normalized to 0. If the grid clears and the note tells you a matrix "needs exactly N numbers," it means your input count does not match the chosen size.

A practical caveat: addition, subtraction, and multiplication all require both matrices to share the size set by the Size selector, and this tool only supports square 2x2 and 3x3 cases, so non-square matrices and other dimensions are out of scope. Order also matters for multiplication, since matrix products are not commutative, A x B is generally different from B x A, so enter your matrices in the sequence the problem specifies.

Frequently asked questions

Can I add a 2x2 matrix to a 3x3 matrix?
No. Addition, subtraction, and multiplication here require both matrices to be the same square size, set by the Size selector. Pick one size and fill both grids accordingly.
Why do determinant and transpose ignore Matrix B?
Those are single-matrix operations, so they always use Matrix A only. The Matrix B field is hidden automatically when you choose Determinant or Transpose.
Is my data uploaded anywhere?
No — this calculator runs entirely in your browser; nothing is uploaded.
Is it free?
Yes, completely free with no sign-up and no limits.

People also ask

How do I know if a matrix is invertible using this calculator?
Run the Determinant operation on Matrix A; if the result is any nonzero number the matrix is invertible, and if it is zero the matrix is singular and has no inverse. This tool reports the determinant value but does not compute the inverse matrix itself.
Can this matrix calculator find the inverse of a matrix?
No. It supports addition, subtraction, multiplication, determinant, and transpose only. You can use the determinant result to check whether an inverse exists, but the inverse is not calculated here.
Does matrix multiplication order matter?
Yes. Matrix multiplication is not commutative, so A x B usually gives a different result than B x A. Enter the matrices in the order required by your problem, since swapping them can change the answer.
What is the difference between a determinant and a transpose?
A determinant is a single number computed from a square matrix that summarizes properties like invertibility, while a transpose is a new matrix formed by swapping rows and columns. The determinant returns a scalar and the transpose returns a matrix of the same size.
Can I use decimals or negative numbers in the matrices?
Yes. You can enter negative values and decimal numbers, and the calculator parses any numeric tokens separated by spaces or commas. Results are rounded to six decimal places for display.
How do I enter a matrix in the input box?
Type each row on its own line, separating the values within a row by spaces or commas. The total count of numbers must equal N times N for the size you selected, for example four numbers for a 2x2 or nine for a 3x3.
Why does my result disappear or show a dash?
That usually means the number of values you entered does not match the selected size, so the calculator cannot form a valid square matrix. Check that each matrix contains exactly N times N numbers for your chosen 2x2 or 3x3 size.
What does the determinant of a matrix tell you?
The determinant is a scalar that indicates whether a square matrix is invertible (nonzero) or singular (zero), and its magnitude relates to how the matrix scales area or volume. A negative determinant indicates the transformation also reverses orientation.

Related calculators