standarddeviationcalculator.net

Updated Free · runs in your browser

--- /* Share button — copies the current URL (with any query params) to clipboard. Placed above calculator sections on tool pages. */ --- /* Source badge — a small inline note that the calculator follows standard / Google-recommended methodology, linking to the methodology page. */ Methodology

Math

Matrix operations calculator

Enter two matrices, one row per line, and choose an operation. For products, every entry of the answer is shown as the row-times-column sum that produced it. For AX = B you get the augmented matrix and each row operation, and the calculator tells you whether the system has one solution, none or infinitely many.

One row per line; entries separated by spaces or commas.

For AX = B, B is the right-hand side: one column for a single system.

Product AB 2×2 matrix
A2×3
B3×2
Result2×2
Multiplications12
A123456B789101112AB5864139154

Entry (i, j) of AB comes from row i of A and column j of B. Red: positive, violet: negative, darker: larger.

AB =5864139154
EntryRow · columnWorking
(1, 1)row 1 · column 11×7 + 2×9 + 3×11 = 58
(1, 2)row 1 · column 21×8 + 2×10 + 3×12 = 64
(2, 1)row 2 · column 14×7 + 5×9 + 6×11 = 139
(2, 2)row 2 · column 24×8 + 5×10 + 6×12 = 154
Show the working, step by step
  1. Check the sizes: 2×3 × 3×2. The inner numbers match (3), so the product exists, and the outer numbers give its size, 2×2.

    A =123456B =789101112
  2. Each entry is the dot product of a row of the first matrix with a column of the second: multiply matching entries and add.

    c11 = 1×7 + 2×9 + 3×11 = 58 c12 = 1×8 + 2×10 + 3×12 = 64 c21 = 4×7 + 5×9 + 6×11 = 139 c22 = 4×8 + 5×10 + 6×12 = 154

  3. Collect the entries.

    AB =5864139154

Matrix multiplication is not commutative: AB and BA are usually different, and one may exist without the other.

The rules

(A ± B)ᵢⱼ = Aᵢⱼ ± Bᵢⱼ same size only (kA)ᵢⱼ = k·Aᵢⱼ any size (AB)ᵢⱼ = Σₖ Aᵢₖ Bₖⱼ A is m×n, B is n×p, AB is m×p

A worked example: AB

The default A is 2×3 and B is 3×2:

A = [ 1 2 3 B = [ 7 8 4 5 6 ] 9 10 11 12 ]

The inner sizes (3 and 3) match, so AB exists and is 2×2. Each entry is a row of A dotted with a column of B:

EntryRow · columnWorkingValue
(1, 1)row 1 · column 11×7 + 2×9 + 3×1158
(1, 2)row 1 · column 21×8 + 2×10 + 3×1264
(2, 1)row 2 · column 14×7 + 5×9 + 6×11139
(2, 2)row 2 · column 24×8 + 5×10 + 6×12154

So AB = [58 64; 139 154]. Switch to BA and the product is 3×3 instead: [39 54 69; 49 68 87; 59 82 105]. Same two matrices, a different size of answer. Order matters.

A worked example: solving AX = B

The system

2x + y − z = 8 −3x − y + 2z = −11 −2x + y + 2z = −3

has coefficient matrix A = [2 1 −1; −3 −1 2; −2 1 2] and B = [8; −11; −3]. Enter those and choose “Solve AX = B”. Row-reducing [A | B] takes three pivots:

  1. R1 → R1 ÷ 2, then R2 → R2 + 3R1 and R3 → R3 + 2R1 clear column 1.
  2. R2 → 2R2, then R1 → R1 − ½R2 and R3 → R3 − 2R2 clear column 2.
  3. R3 → −R3, then R1 → R1 + R3 and R2 → R2 − R3 clear column 3.

The left block is now I, and the right-hand column reads x = 2, y = 3, z = −1. Substituting back: 2(2) + 3 − (−1) = 8, −3(2) − 3 + 2(−1) = −11 and −2(2) + 3 + 2(−1) = −3.

One, none or infinitely many solutions

After row reductionMeaningExample
A pivot in every column of AExactly one solutionThe system above
A row [0 0 … 0 | c] with c ≠ 0No solution (inconsistent)x + 2y = 3, 2x + 4y = 7
A column of A without a pivot, and no contradictionInfinitely manyx + 2y = 3, 2x + 4y = 6 gives x = 3 − 2t, y = t

Common mistakes

  • Multiplying entry by entry. That is the Hadamard product, a different operation. The ordinary product uses rows times columns.
  • Checking the wrong dimensions. It is the columns of the first and the rows of the second that must match, not the two row counts.
  • Dividing by a matrix. There is no matrix division. To “divide” by A, multiply by A⁻¹, on the correct side: AX = B gives X = A⁻¹B, not BA⁻¹.
  • Assuming (A + B)² = A² + 2AB + B². It equals A² + AB + BA + B², which is the same only when AB = BA.
Matrix operations calculator: the worked example on this page, with its result and chart
Matrix operations calculator: the worked example above, at a glance.

Common questions

When can two matrices be multiplied?

AB exists when the number of columns of A equals the number of rows of B. Write the sizes side by side: (2×3)(3×2). The inner numbers must match, and the outer numbers give the size of the answer, here 2×2. A 2×3 matrix times a 2×3 matrix is undefined.

Is AB equal to BA?

Usually not. With the default matrices AB is 2×2 and BA is 3×3, so they are not even the same size. Even for square matrices the products generally differ: matrix multiplication is associative, (AB)C = A(BC), and distributive, but not commutative.

How do you calculate one entry of a matrix product?

Entry (i, j) of AB is row i of A dotted with column j of B: multiply the pairs of entries and add. For the default matrices, entry (2, 1) is 4×7 + 5×9 + 6×11 = 28 + 45 + 66 = 139. The calculator lists this working for every entry.

How do I solve a system of equations with matrices?

Write the system as AX = B, with the coefficients in A and the right-hand sides in B, and row-reduce [A | B]. If the left block becomes I, the right block is the unique solution. A row reading 0 = (non-zero) means no solution; a column without a pivot means a free variable and infinitely many solutions. Using A⁻¹B gives the same answer when A is invertible.

Can I add matrices of different sizes?

No. Addition and subtraction work entry by entry, so both matrices must have the same number of rows and the same number of columns. A scalar multiple kA works for any size.