3×3 Eigenvalue and Eigenvector Calculator
Introduction: How this 3×3 eigenvalue calculator works
This 3×3 eigenvalue calculator turns a real matrix into its characteristic polynomial, then uses that cubic to report the eigenvalues and a real eigenvector for each real root. The workflow is designed for students checking linear algebra homework and for anyone who needs a fast sanity check on a small system without opening a full numerical package.
Enter the nine entries in row-major order. The calculator reads the diagonal trace, the principal minors, and the determinant from those values, solves the cubic with Cardano’s method, and then builds a normalized eigenvector for each real eigenvalue by finding a direction in the null space of A − λI. Complex roots are still listed, but the real-only eigenvector step is skipped for them.
Characteristic polynomial of a 3×3 matrix
For a 3×3 eigenvalue problem, everything starts with the matrix itself:
Formula: A = [a_11 a_12 a_13 a_21 a_22 a_23 a_31 a_32 a_33]
The eigenvalues are the roots of the characteristic polynomial
p(λ) = det(λI − A).
For a 3×3 matrix this polynomial has the general form
λ³ − t1 λ² + t2 λ − det(A) = 0,
where
- t1 = trace(A) = a11 + a22 + a33 is the sum of diagonal entries,
- t2 is the sum of the 2×2 principal minors,
- det(A) is the determinant of the matrix.
The calculator computes these coefficients directly from your nine inputs and then solves the cubic exactly in closed form (up to floating‑point arithmetic) using Cardano’s method, without relying on iterative root-finding.
How the calculator finds eigenvalues (Cardano’s method)
After the characteristic cubic is assembled, the 3×3 eigenvalue calculator rewrites it in depressed form so Cardano’s formulas apply cleanly.
λ³ − t1 λ² + t2 λ − det(A) = 0,
the script converts it to a depressed cubic of the simpler form
y³ + py + q = 0
by substituting λ = y + t1/3. The new coefficients p and q depend on t1, t2, and det(A). The discriminant
Δ = (q² / 4) + (p³ / 27)
determines the structure of the roots:
- Δ > 0: one real eigenvalue and a complex-conjugate pair,
- Δ = 0: multiple roots (at least two eigenvalues are equal),
- Δ < 0: three distinct real eigenvalues.
For Δ ≥ 0, Cardano’s formula expresses a real solution as the sum of two cube roots, and the remaining roots follow from algebraic relations. For Δ < 0, trigonometric expressions with arccosines are used to obtain all three real roots while keeping numerical errors under control. The implementation chooses the appropriate branch based on the discriminant and returns eigenvalues formatted as real numbers when possible or as complex values when needed.
How the calculator finds eigenvectors
Once a real eigenvalue λ is known, the 3×3 eigenvalue calculator finds eigenvectors from the null space of
(A − λI)v = 0.
For a 3×3 system, the null space is typically one-dimensional when λ is a simple eigenvalue. Instead of running a full Gaussian elimination, the calculator exploits the geometry of cross products. Each row of A − λI is a vector in ℝ³. Any eigenvector must be orthogonal to all rows, because their dot product is zero.
The cross-product null-space step works like this:
- Form the matrix B = A − λI.
- Choose two rows of B that are not (numerically) parallel.
- Take their cross product to obtain a vector orthogonal to both rows, and hence in the null space.
- If the first pair of rows is nearly dependent (which can happen for repeated eigenvalues or nearly singular matrices), a different pair is tried.
- Normalize the resulting vector to unit length before displaying it.
This provides one representative eigenvector for each real eigenvalue. Any nonzero scalar multiple of the reported vector is also a valid eigenvector.
Worked example: eigenpairs of a diagonal 3×3 matrix
This diagonal case is a convenient test for the 3×3 eigenvalue calculator because the eigenvalues sit on the diagonal and the eigenvectors line up with the standard basis.
A = diag(1, 2, 3) = .
If you enter 1, 0, 0 in the first row, 0, 2, 0 in the second row, and 0, 0, 3 in the third row, the characteristic polynomial factors as
(λ − 1)(λ − 2)(λ − 3) = 0,
so the eigenvalues are 1, 2, and 3. For each eigenvalue, the matrix A − λI becomes diagonal with one zero on the diagonal, and its null space is spanned by a standard basis vector:
- For λ = 1, eigenvectors are multiples of (1, 0, 0)ᵀ.
- For λ = 2, eigenvectors are multiples of (0, 1, 0)ᵀ.
- For λ = 3, eigenvectors are multiples of (0, 0, 1)ᵀ.
The calculator will display eigenvalues 1, 2, and 3 (subject to rounding) and normalized eigenvectors equal to the three standard basis vectors. You can use this matrix as a quick check that the browser and the script are working as expected before moving on to a less structured example.
Interpreting 3×3 eigenvalue results
When the 3×3 eigenvalue calculator finishes, you will typically see a list of roots and, for each real root, a unit eigenvector. These are the most useful ways to read a 3×3 eigenvalue output:
- Magnitude of eigenvalues: |λ| > 1 indicates stretching along the eigenvector, 0 < |λ| < 1 indicates contraction, λ = 0 collapses the direction, and negative λ flips orientation.
- Repeated eigenvalues: If two or three eigenvalues are numerically equal, the matrix may be defective or simply very close to a repeated-root case in floating-point arithmetic. The calculator still reports the roots, but the reported vectors may not describe every direction in the eigenspace.
- Complex eigenvalues: These often correspond to rotation or spiral behavior in the plane associated with the real and imaginary parts of the eigenvectors. The tool reports complex eigenvalues but omits eigenvectors, since it works over the real numbers only.
You can use the eigenpairs to judge whether a 3×3 matrix stretches or shrinks certain directions, whether repeated roots may be hiding a smaller eigenspace, and whether the matrix is likely to be diagonalizable over the real numbers.
Comparison: what this 3×3 eigenvalue tool does and does not do
| Aspect | Supported by this 3×3 eigenvalue calculator | Not supported / out of scope |
|---|---|---|
| Matrix size | Exactly 3×3 real matrices | 2×2, 4×4, or larger matrices |
| Eigenvalues | Real and complex eigenvalues of the characteristic cubic | Symbolic parameters or matrices with non-numeric entries |
| Eigenvectors | One normalized eigenvector for each real eigenvalue | Eigenvectors corresponding to complex eigenvalues in ℂ³ |
| Computation method | Closed-form cubic solution (Cardano) and cross products | Iterative numerical methods (QR iteration, power method, etc.) |
| Precision | Double-precision floating‑point in the browser | Arbitrary precision or exact symbolic algebra |
| Use cases | Checking homework, quick engineering estimates, teaching demos | Heavy-duty numerical linear algebra for large systems |
Assumptions and limitations for 3×3 eigenvalue calculations
The 3×3 eigenvalue calculator is built for plain real matrices, so the following caveats matter when you compare the output with hand work or another tool:
- Numeric 3×3 input only: Each entry must be a real number. The calculator does not accept symbolic parameters or complex entries in the input matrix.
- Floating‑point rounding: All computations use standard double-precision floating-point arithmetic in JavaScript. Very large or very small values can lead to rounding errors, and eigenvalues that are theoretically equal may differ slightly numerically.
- Nearly repeated eigenvalues: When eigenvalues are equal or very close together, the characteristic polynomial becomes ill-conditioned. This can amplify numerical errors and make eigenvectors less stable. Small perturbations in the input may result in noticeably different eigenvectors.
- Defective matrices: If the matrix does not have a complete set of eigenvectors, the null space of A − λI may still contain eigenvectors, but you cannot diagonalize the matrix using them alone. The calculator reports one eigenvector per real eigenvalue and does not attempt to construct generalized eigenvectors.
- Complex eigenvectors not shown: For complex eigenvalues, the true eigenvectors live in a complex vector space. Because the interface is oriented toward real arithmetic, those eigenvectors are not computed or displayed.
- No error estimates: The tool does not provide formal error bounds, condition numbers, or residual checks. If you require strict guarantees, you should verify results with a specialist numerical linear algebra package.
For classwork, quick design checks, or exploratory algebra, these constraints are usually acceptable. For high-stakes engineering or very ill-conditioned matrices, treat this calculator as a fast reference rather than a final authority.
How to use: Entering a 3×3 matrix for eigenvalue calculation
Enter the matrix row by row so the calculator sees the 3×3 grid in the same order you would write it on paper:
- First row: a11, a12, a13,
- Second row: a21, a22, a23,
- Third row: a31, a32, a33.
If you are checking hand calculations, start with diagonal or triangular matrices whose eigenvalues are easy to predict, then move on to more complicated examples. For sensitive problems, it is wise to compare the answer with a computer algebra system or numerical library.
Definitions: eigenvalues and eigenvectors in a 3×3 matrix
For a square matrix A, a (right) eigenvalue–eigenvector pair (λ, v) satisfies
Av = λv,
where v is a nonzero column vector and λ is a scalar. Geometrically, v points along a special direction that the linear transformation represented by A simply stretches or flips, without changing its direction. In three dimensions, you can think of these as principal stretching directions of space.
For a 3×3 matrix, there are up to three (not necessarily distinct) eigenvalues, counting algebraic multiplicity. They may be all real, one real with a pair of complex conjugates, or multiple equal values in the repeated-root case. The calculator works with all of these situations but only forms explicit eigenvectors for real eigenvalues.
Formula: how the 3×3 eigenvalue result is built
The calculator combines the trace t1 = a11 + a22 + a33, the sum of the principal 2×2 minors t2, and the determinant det(A) into the characteristic cubic λ³ − t1 λ² + t2 λ − det(A) = 0. From there, the cubic solver finds the roots, and each real root is passed into the null-space step so the page can report a matching eigenvector. That is why the nine matrix entries are enough to recover the real eigenpairs for a 3×3 problem.
Arcade Mini-Game: 3×3 Eigenvalue and Eigenvector Calculator Calibration Run
Use this quick arcade run to practice separating useful scenario inputs from common planning mistakes before you rely on the calculator output.
Start the game, then use your pointer or arrow keys to catch useful inputs and avoid bad assumptions.
