3×3 Eigenvalue and Eigenvector Calculator
Introduction: What this 3×3 eigenvalue and eigenvector calculator does
This calculator takes a real 3×3 matrix as input and returns its eigenvalues and, for each real eigenvalue, a corresponding eigenvector. Internally, it builds the characteristic polynomial of the matrix, solves the resulting cubic equation using Cardano’s method, and then finds eigenvectors from the null space of A − λI. The tool is intended for students and practitioners who need quick eigenpairs for linear algebra exercises, vibration or stability analysis, or checks on manual calculations.
You enter the nine matrix entries in row-major order. The script computes the trace, determinant, and intermediate coefficients, solves for the eigenvalues, and then constructs normalized eigenvectors using cross products of rows of A − λI whenever the eigenvalue is real. Complex eigenvalues are still reported, but their eigenvectors are omitted because the implementation works over the real numbers only.
Characteristic polynomial of a 3×3 matrix
Let
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 assembling the characteristic polynomial
λ³ − 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 an eigenvalue λ is known and is real, the corresponding eigenvectors are the nonzero solutions 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 script proceeds as follows:
- 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 simple 3×3 matrix
Consider the diagonal matrix
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 sanity check that your browser and the script are working as expected.
Interpreting the results
When the computation finishes, you will typically see a list of eigenvalues and, for each real eigenvalue, a unit eigenvector. Some common interpretations are:
- 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 (fewer than three linearly independent eigenvectors). The calculator still reports eigenvalues, but the reported eigenvectors may not span the full eigenspace.
- Complex eigenvalues: These correspond to rotations and spirals in the plane spanned by the real and imaginary parts of the eigenvectors. The tool reports complex eigenvalues but omits eigenvectors, since they would live in ℂ³ rather than ℝ³.
You can use the eigenpairs to diagonalize a matrix when it has a full set of independent eigenvectors, to analyze stability of linear dynamical systems (e.g., sign of the real parts of eigenvalues), or to understand principal axes in physical or geometric problems.
Comparison: what this calculator does and does not do
| Aspect | Supported by this 3×3 tool | 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
The implementation makes several assumptions that are important for interpreting the results correctly:
- Numeric 3×3 input only: All entries are treated as real numbers. 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 (for example, a Jordan block), 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 teaching and light computational work, these limitations are usually acceptable. For safety‑critical engineering or large‑scale simulations, treat this calculator as a quick reference rather than a final authority.
How to use: Tips for using the calculator effectively
Arrange your entries row by row to match the standard matrix layout:
- First row: a11, a12, a13,
- Second row: a21, a22, a23,
- Third row: a31, a32, a33.
If you are checking hand calculations, try entering matrices with known eigenvalues (diagonal or triangular matrices) first, then move on to more complicated examples. For sensitive problems, it is wise to re-run the computation in a computer algebra system or numerical library and compare eigenvalues and eigenvectors.
Definitions: eigenvalues and eigenvectors
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 estimate is built
The result can be read as result = f(a, b, c), where those inputs represent a11, a12, a13. Keep money, time, distance, percentage, and count fields in the units requested by the form.
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.
