Matrices · Vectors · Linear algebra

AI Matrix Solver for determinants, inverses and more

Matrix arithmetic is mostly bookkeeping — and one misplaced sign in a 3×3 determinant ruins the answer. This AI matrix solver does the bookkeeping in full view: every cofactor, every row-times-column product, with exact fractions and an independent recomputation before the answer is shown.

  • ✓ Recomputed independently
  • Exact fractions
  • 2×2 and 3×3
  • Vectors too

What math problem do you want to solve?

Ctrl+V pastes a screenshot · Shift+Enter: new line (one equation per line)

Try

Typed problems our engine solves stay in your browser. Photos, screenshots, PDFs and AI-helped problems are processed by our AI service — privacy.

Matrices · Vectors · Linear algebra · worked example✓ Verified
inverse of [2111]\text{inverse }\allowbreak \text{of } \begin{bmatrix}2 & 1 \\ 1 & 1\end{bmatrix}
Use the 2 × 2 inverse formula
(abcd)−1=1ad−bc(d−b−ca)\begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}
Find the determinant
ad−bc=(2)(1)−(1)(1)=1ad - bc = (2)(1) - (1)(1) = 1
Swap a and d, negate b and c
(1−1−12)\begin{pmatrix}1 & -1 \\ -1 & 2\end{pmatrix}
(1−1−12)\begin{pmatrix}1 & -1 \\ -1 & 2\end{pmatrix}Re-checked by a second engine
Matrices · Vectors · Linear algebra · worked example✓ Verified
[1234]⋅[0110]\begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix} \cdot \begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix}
Check the sizes
(2×2)(2×2)→2×2(2 \times 2)(2 \times 2) \to 2 \times 2
Multiply rows by columns
(AB)ij=row i of A⋅column j of B\displaystyle (AB)_{ij} = \allowbreak \text{row } i \allowbreak \text{ of } A \cdot \allowbreak \text{column } j \allowbreak \text{ of } B
Row 1 of the product
(1)(0)+(2)(1)=2,(1)(1)+(2)(0)=1\displaystyle (1)(0) + (2)(1) = 2,\allowbreak \quad (1)(1) + (2)(0) = 1
(2143)\begin{pmatrix}2 & 1 \\ 4 & 3\end{pmatrix}Re-checked by a second engine
Matrices · Vectors · Linear algebra · worked example✓ Verified
<1,2,3>×<4,5,6>\displaystyle <1,\allowbreak 2,\allowbreak 3> \times <4,\allowbreak 5,\allowbreak 6>
Set up the determinant
a×b=∣ijk123456∣\mathbf{a} \times \mathbf{b} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 1 & 2 & 3 \\ 4 & 5 & 6 \end{vmatrix}
Work out the i component
(2)(6)−(3)(5)=−3(2)(6) - (3)(5) = -3
Work out the j component
−[(1)(6)−(3)(4)]=6-\left[(1)(6) - (3)(4)\right] = 6
⟨−3,6,−3⟩\displaystyle \langle -3,\allowbreak 6,\allowbreak -3 \rangleRe-checked by a second engine

1 / 3

Typing matrices

How to enter a matrix

Write a matrix as a list of rows, each row in square brackets, the whole thing in another pair: [[1,2],[3,4]] is the 2×2 matrix with first row 1, 2 and second row 3, 4. Then say what you want:

  • det([[1,2],[3,4]]) — the determinant.
  • inverse of [[2,1],[1,1]] — the inverse matrix.
  • transpose [[1,2,3],[4,5,6]] — swap rows and columns.
  • [[1,2],[3,4]] + [[5,6],[7,8]] and [[1,2],[3,4]] * [[0,1],[1,0]] — sums and products.
  • Vectors use angle brackets: <1, 2, 3> × <4, 5, 6> for a cross product, |<3, 4>| for a magnitude — the same vector work that forces and velocities need in the AI physics solver.

Worked linear algebra

Five matrix and vector problems, step by step

Every entry of every answer is recomputed independently before it is shown.

Example 1 · A 3×3 determinant

det⁡[201132111]\det \begin{bmatrix}2 & 0 & 1 \\ 1 & 3 & 2 \\ 1 & 1 & 1\end{bmatrix}

Expand along the first row; the zero in it saves one whole cofactor.

00
✓ Verified

Independent check

Row reduction gives the same value, 0.\text{Row reduction gives the same value, } 0\text{.}

A determinant of 0 means the matrix is singular: it has no inverse, and its rows are linearly dependent.

  1. Expand along the first row
    2 ∣3211∣−0 ∣1211∣+1 ∣1311∣ 2\,\begin{vmatrix}3 & 2 \\ 1 & 1\end{vmatrix} - 0\,\begin{vmatrix}1 & 2 \\ 1 & 1\end{vmatrix} + 1\,\begin{vmatrix}1 & 3 \\ 1 & 1\end{vmatrix}
    Each entry times its 2×2 minor, with signs + − +.
  2. Work out each 2×2 minor
    2(1)−0(−1)+1(−2) 2(1) - 0(-1) + 1(-2)
    Each minor is ad − bc.
  3. Add up
    =0= 0
    Combine the three terms.

Example 2 · The inverse of a 2×2

inverse of [2111]\text{inverse }\allowbreak \text{of } \begin{bmatrix}2 & 1 \\ 1 & 1\end{bmatrix}

Swap the diagonal, negate the off-diagonal, divide by the determinant.

(1−1−12)\begin{pmatrix}1 & -1 \\ -1 & 2\end{pmatrix}
✓ Verified

Independent check

(2111)(1−1−12)=(1001)\begin{pmatrix}2 & 1 \\ 1 & 1\end{pmatrix}\begin{pmatrix}1 & -1 \\ -1 & 2\end{pmatrix} = \begin{pmatrix}1 & 0 \\ 0 & 1\end{pmatrix}
  1. Use the 2 × 2 inverse formula
    (abcd)−1=1ad−bc(d−b−ca)\begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}
    Swap the diagonal entries, change the signs of the other two, and divide by the determinant.
  2. Find the determinant
    ad−bc=(2)(1)−(1)(1)=1ad - bc = (2)(1) - (1)(1) = 1
    The determinant is not 0, so the inverse exists.
  3. Swap a and d, negate b and c
    (1−1−12)\begin{pmatrix}1 & -1 \\ -1 & 2\end{pmatrix}
    This is the adjugate of a 2 × 2 matrix.
  4. Divide by the determinant
    A−1=(1−1−12)A^{-1} = \begin{pmatrix}1 & -1 \\ -1 & 2\end{pmatrix}
    The determinant is 1, so dividing by it changes nothing: the adjugate is the inverse.

Example 3 · Matrix multiplication

[1234]⋅[0110]\begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix} \cdot \begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix}

Each entry is a row of the first matrix dotted with a column of the second.

(2143)\begin{pmatrix}2 & 1 \\ 4 & 3\end{pmatrix}
✓ Verified

Independent check

Decimal check: (2143)\text{Decimal check: } \begin{pmatrix}2 & 1 \\ 4 & 3\end{pmatrix}
  1. Check the sizes
    (2×2)(2×2)→2×2(2 \times 2)(2 \times 2) \to 2 \times 2
    The first matrix has 2 columns and the second has 2 rows, so they can be multiplied; the product has 2 rows and 2 columns.
  2. Multiply rows by columns
    (AB)ij=row i of A⋅column j of B\displaystyle (AB)_{ij} = \allowbreak \text{row } i \allowbreak \text{ of } A \cdot \allowbreak \text{column } j \allowbreak \text{ of } B
    Each entry is a row of the first matrix times a column of the second.
  3. Row 1 of the product
    (1)(0)+(2)(1)=2,(1)(1)+(2)(0)=1\displaystyle (1)(0) + (2)(1) = 2,\allowbreak \quad (1)(1) + (2)(0) = 1
    Row 1 of the first matrix times each column of the second.
  4. Row 2 of the product
    (3)(0)+(4)(1)=4,(3)(1)+(4)(0)=3\displaystyle (3)(0) + (4)(1) = 4,\allowbreak \quad (3)(1) + (4)(0) = 3
    Row 2 of the first matrix times each column of the second.
  5. Write the product
    (2143)\begin{pmatrix}2 & 1 \\ 4 & 3\end{pmatrix}
    Put the entries in their places.

Example 4 · A transpose

transpose [123456]\text{transpose } \begin{bmatrix}1 & 2 & 3 \\ 4 & 5 & 6\end{bmatrix}

A 2×3 matrix becomes 3×2: row i becomes column i.

(142536)\begin{pmatrix}1 & 4 \\ 2 & 5 \\ 3 & 6\end{pmatrix}
✓ Verified

Independent check

Decimal check: (142536)\text{Decimal check: } \begin{pmatrix}1 & 4 \\ 2 & 5 \\ 3 & 6\end{pmatrix}
  1. Rows become columns
    (142536)\begin{pmatrix}1 & 4 \\ 2 & 5 \\ 3 & 6\end{pmatrix}
    Row i of the matrix becomes column i.

Example 5 · A cross product

<1,2,3>×<4,5,6>\displaystyle <1,\allowbreak 2,\allowbreak 3> \times <4,\allowbreak 5,\allowbreak 6>

The result is perpendicular to both vectors; the solver uses the determinant layout.

⟨−3,6,−3⟩\displaystyle \langle -3,\allowbreak 6,\allowbreak -3 \rangle
✓ Verified

Independent check

⟨−3,6,−3⟩⋅⟨1,2,3⟩=0 and ⟨−3,6,−3⟩⋅⟨4,5,6⟩=0, so the result is perpendicular to both vectors.\langle -3, 6, -3 \rangle \cdot \langle 1, 2, 3 \rangle = 0 \text{ and } \langle -3, 6, -3 \rangle \cdot \langle 4, 5, 6 \rangle = 0\text{, so the result is perpendicular to both vectors.}
∣a×b∣2=54=∣a∣2∣b∣2−(a⋅b)2=(14)(77)−(32)2|\mathbf{a} \times \mathbf{b}|^2 = 54 = |\mathbf{a}|^2|\mathbf{b}|^2 - (\mathbf{a} \cdot \mathbf{b})^2 = (14)(77) - (32)^2
  1. Set up the determinant
    a×b=∣ijk123456∣\mathbf{a} \times \mathbf{b} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ 1 & 2 & 3 \\ 4 & 5 & 6 \end{vmatrix}
    The cross product is the determinant with the unit vectors i, j, k in the top row.
  2. Work out the i component
    (2)(6)−(3)(5)=−3(2)(6) - (3)(5) = -3
    Cover the i column and take the 2 × 2 determinant of what is left.
  3. Work out the j component
    −[(1)(6)−(3)(4)]=6-\left[(1)(6) - (3)(4)\right] = 6
    Cover the j column; the middle component takes a minus sign.
  4. Work out the k component
    (1)(5)−(2)(4)=−3(1)(5) - (2)(4) = -3
    Cover the k column and take the 2 × 2 determinant of what is left.
  5. Write the cross product
    a×b=⟨−3,6,−3⟩\displaystyle \mathbf{a} \times \mathbf{b} = \langle -3,\allowbreak 6,\allowbreak -3 \rangle
    Put the three components together.

Reference

Matrix formulas worth knowing

2×2 determinant

det⁡(abcd)=ad−bc\det\begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc

2×2 inverse

(abcd)−1=1ad−bc(d−b−ca)\begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}

Exists only when ad − bc ≠ 0.

Product entry

(AB)ij=∑kAikBkj(AB)_{ij} = \sum_k A_{ik} B_{kj}

Columns of A must equal rows of B.

Transpose of a product

(AB)T=BTAT(AB)^T = B^T A^T

The order reverses.

Magnitude

∣⟨a,b⟩∣=a2+b2|\langle a, b \rangle| = \sqrt{a^2 + b^2}

Dot product

u⋅v=∣u∣∣v∣cos⁡θ\mathbf{u} \cdot \mathbf{v} = |\mathbf{u}||\mathbf{v}|\cos\theta

Zero exactly when the vectors are perpendicular.

Scope

What the AI matrix solver covers — and does not

The solver is built for the matrix work in Algebra 2, precalculus and the first weeks of a linear algebra course: arithmetic, determinants, inverses, transposes and vectors in two and three dimensions.

Eigenvalues, row reduction to echelon form, rank and matrices with symbolic entries are not verified yet. You can still ask; any AI response will come without ✓ Verified, so check it against your notes. Systems of linear equations can be solved directly in the equation solver — including three equations in three unknowns.

A question that only uses a matrix along the way — a determinant inside a larger algebra problem, say — can be typed whole into the homepage AI math solver, which reads the full question before it calculates.

FAQ

Frequently asked questions

What can the AI matrix solver calculate?

Determinants of 2×2 and 3×3 matrices, inverses, sums, products and transposes, plus vector magnitudes, cross products and the angle between vectors — each with steps and an independent check.

How do I type a matrix?

As rows inside brackets: [[1,2],[3,4]]. Each inner bracket is one row, separated by commas.

Why does it say the matrix has no inverse?

Because its determinant is zero. A singular matrix squashes space flat, so the transformation cannot be undone.

Can it find eigenvalues?

Not with verification yet. For a 2×2 matrix you can find them yourself by solving the characteristic equation det⁡(A−λI)=0\det(A - \lambda I) = 0, which is a quadratic the solver can check.

Can it solve a system of equations with matrices?

You can solve the system directly: type the equations separated by semicolons in the equation solver. The answer is the same as the matrix method gives.

Does it work with fractions in matrices?

Yes. Entries and results stay exact, so an inverse with fractional entries is shown as fractions, not decimals.

Let the solver do the bookkeeping

Type your matrix as rows at the top of this page and follow every cofactor and product.