English

Matrix Calculator — Basic Operations

Perform basic operations on small rectangular matrices

Runs in your browser · nothing is uploaded

What it does

Calculate the sum, difference or product of two small matrices, or transpose a single matrix. Input accepts rows of numbers rather than a fixed grid, so it is easy to paste a rectangular block from a spreadsheet. Output uses tabs between columns and newlines between rows.

How to use

  1. Enter Matrix A with one row per line and spaces, commas or semicolons between values.
  2. Enter Matrix B for addition, subtraction or multiplication. Transpose uses A only.
  3. Choose an operation, calculate, and copy the resulting matrix.

Calculation rules and limits

  • Each matrix must be rectangular and no larger than 6 rows by 6 columns.
  • Addition and subtraction require A and B to have the same shape.
  • For A × B, the number of columns in A must equal the number of rows in B. Order matters.
  • Signed decimals and scientific notation are accepted up to absolute value 1e12. Floating-point results are displayed with up to 12 significant digits. This tool does not calculate inverses, determinants or eigenvalues.

Example

For A = [1 2; 3 4] and B = [5 6; 7 8], A × B = [19 22; 43 50]. Transposing A produces [1 3; 2 4]. In the input fields, replace each semicolon in this example with a newline.

Calculations run in your browser without uploading your calculation data. Changing an input clears the previous result; choose Calculate again to get the updated answer.

FAQ

Why is multiplication rejected for two equally sized matrices?

Equal sizes are not sufficient for rectangular multiplication. A 2 × 3 matrix needs B to have 3 rows. Two 2 × 3 matrices cannot be multiplied in that order.

What happens to B during transpose?

It is ignored. Transpose swaps rows and columns of Matrix A and does not require Matrix B to be valid.

Can I paste numbers from a spreadsheet?

Yes. Tabs separate columns and newlines separate rows. Every row must have the same number of values.

Missing a tool?