✨ Free step-by-step solutions with full working — no sign-up ever needed

Matrix & Vector Calculator

Free online matrix and vector calculator. Compute row reduction (RREF), determinants, inverses, and vector operations with steps shown.

[ ] Matrix & Vector Calculator

Overview & Concepts

A matrix is a rectangular array of numbers arranged in rows and columns, written as an m × n grid (m rows, n columns). Matrices are used to represent systems of linear equations, transformations in geometry, and data in engineering and computer science. A vector is simply a special case — a matrix with a single row or column — that represents a quantity with both magnitude and direction.

Our matrix calculator solver handles the core operations you'll encounter in algebra, linear algebra, and applied engineering courses: addition, subtraction, scalar multiplication, matrix multiplication, transposition, determinants, inverses, and the reduced echelon form of matrix calculator workflow (commonly called RREF) used to solve systems of linear equations. For vectors specifically, it supports dot products, cross products, and magnitude calculations.

If your work involves symbolic equations rather than numeric grids, you may also want our Equation Solver for solving individual equations, or the Calculus Solver if your matrix problem is part of a larger differential equations or optimization task.

Step-by-Step Mathematical Method

Determinant (2×2): For a matrix A = [[a, b], [c, d]], the determinant is det(A) = ad − bc.

Inverse (2×2): If det(A) ≠ 0, the inverse is A-1 = (1/det(A)) × [[d, -b], [-c, a]] — swap the diagonal entries, negate the off-diagonal entries, then divide every entry by the determinant.

Row Reduction to RREF: To solve a system of linear equations, write it as an augmented matrix, then apply three allowed row operations — swapping rows, multiplying a row by a nonzero scalar, and adding a multiple of one row to another — until the matrix reaches reduced row echelon form: leading 1's (pivots) in each nonzero row, with zeros above and below each pivot.

Dot Product: For vectors u = (u1, u2, u3) and v = (v1, v2, v3), u · v = u1v1 + u2v2 + u3v3, a single scalar value.

Cross Product: For 3D vectors, u × v produces a new vector perpendicular to both, calculated using the determinant expansion of the standard basis vectors i, j, k against the components of u and v.

Worked Examples with Solutions

Example 1: Determinant and Inverse of a 2×2 Matrix

Determinant & Inverse Walkthrough

Given A = [[4, 3], [6, 3]], copy each step directly:

1
Step 1: det(A) = (4)(3) - (3)(6) = 12 - 18 = -6
2
Step 2: Since det(A) = -6 (nonzero), the inverse exists
3
Step 3: Swap diagonal, negate off-diagonal: [[3, -3], [-6, 4]]
4
Step 4: Divide every entry by det(A) = -6
5
Step 5: A^-1 = [[-0.5, 0.5], [1, -0.6667]]

You can verify this result by multiplying A · A-1, which should return the identity matrix [[1, 0], [0, 1]].

Example 2: Solving a System with Row Reduction (RREF)

RREF Solving Walkthrough

Given the system 2x + y - z = 8, -3x - y + 2z = -11, -2x + y + 2z = -3, copy each step:

1
Step 1: Write the augmented matrix: [2, 1, -1 | 8], [-3, -1, 2 | -11], [-2, 1, 2 | -3]
2
Step 2: Divide Row 1 by 2: [1, 0.5, -0.5 | 4]
3
Step 3: Add 3x Row 1 to Row 2, and 2x Row 1 to Row 3, to clear column 1
4
Step 4: Resulting rows: [0, 0.5, 0.5 | 1] and [0, 2, 1 | 5]
5
Step 5: Scale and eliminate column 2, then column 3, to reach reduced form
6
Step 6: Final RREF: [1, 0, 0 | 2], [0, 1, 0 | 3], [0, 0, 1 | -1]
7
Step 7: Read off the solution directly: x = 2, y = 3, z = -1

Example 3: Vector Dot and Cross Product

Vector Operations Walkthrough

Given u = (2, -1, 3) and v = (4, 0, -2), copy each step:

1
Step 1: Dot product: u . v = (2)(4) + (-1)(0) + (3)(-2) = 8 + 0 - 6 = 2
2
Step 2: Cross product i-component: (-1)(-2) - (3)(0) = 2
3
Step 3: Cross product j-component: -[(2)(-2) - (3)(4)] = -(-16) = 16
4
Step 4: Cross product k-component: (2)(0) - (-1)(4) = 4
5
Step 5: u x v = (2, 16, 4)
6
Step 6: Magnitude of u: |u| = sqrt(2^2 + (-1)^2 + 3^2) = sqrt(14) ≈ 3.742

Reference Values & Comparison Table

OperationFormula UsedResult (from examples above)
2x2 Determinantdet(A) = ad - bc-6
2x2 Inverse(1/det(A)) x [[d,-b],[-c,a]][[-0.5, 0.5], [1, -0.6667]]
RREF System SolveGaussian elimination to row echelon formx = 2, y = 3, z = -1
Vector Dot Productu1v1 + u2v2 + u3v32
Vector Cross ProductDeterminant expansion with i, j, k(2, 16, 4)

Common Mistakes & Tips

Other frequent errors include: forgetting that matrix multiplication is not commutative (A · B usually does not equal B · A), trying to add or multiply matrices with mismatched dimensions, and stopping row reduction at 'row echelon form' instead of continuing to full 'reduced' echelon form (RREF) where every pivot column has zeros both above and below the pivot.

When solving systems by hand, it also helps to periodically substitute your intermediate values back into the original equations — this catches arithmetic slips early rather than after several more rows of elimination. If your system reduces to a row of all zeros equal to a nonzero constant (like [0, 0, 0 | 5]), the system has no solution; if you get a full row of zeros equal to zero, the system likely has infinitely many solutions.

Frequently Asked Questions

Q1What is the difference between row echelon form and reduced row echelon form (RREF)?
▼
Row echelon form only requires zeros below each pivot, while reduced row echelon form (RREF) requires zeros both above and below each pivot, with each pivot equal to 1. RREF gives a unique, fully simplified result for any matrix.
Q2Can every matrix be inverted?
▼
No. Only square matrices (same number of rows and columns) with a nonzero determinant have an inverse. A square matrix with a determinant of zero is called singular and has no inverse.
Q3How is the cross product different from the dot product?
▼
The dot product of two vectors returns a single scalar number and measures how much the vectors point in the same direction. The cross product is only defined in three dimensions and returns a new vector that is perpendicular to both original vectors.
Q4Can I solve this on a standard scientific calculator?
▼
Basic scientific calculators can handle small 2x2 or 3x3 determinants, but most don't show full row-reduction steps. Our online solver shows the complete step-by-step working, which is useful for checking homework or understanding the process rather than just getting a final answer.
Q5What happens if my matrix isn't square?
▼
Non-square matrices don't have a determinant or a traditional inverse, but they can still be added, subtracted, multiplied (if dimensions are compatible), transposed, and row-reduced to RREF, which is especially useful for solving systems with more equations than unknowns or vice versa.

Related Calculators & Tools

Calculus Solver Pre-Calculus Solver Equation Solver How to Use the Equation Solver on a Calculator AP Calculus AB vs BC vs Pre-Calculus: What's the Difference?