{
  "id": "eigenvector",
  "version": "394f45914fa6",
  "status": "published",
  "name": "Eigenvector Calculator",
  "question": "What are the eigenvectors?",
  "summary": "Finds every eigenvalue of a square matrix (2×2 to 6×6), real or complex, with a unit eigenvector for each, and the characteristic polynomial.",
  "category": "math",
  "subcategory": "linear-algebra",
  "url": "https://www.acalculator.org/math/eigenvector-calculator",
  "markdown": "https://www.acalculator.org/math/eigenvector-calculator.md",
  "kind": "function",
  "method": "Eigenvalues are the roots of det(λI − A) = 0; for each eigenvalue λ, an eigenvector is a nonzero v with (A − λI)v = 0, scaled to length 1.",
  "assumptions": [
    "The matrix is square, 2×2 to 6×6, with real entries. Complex eigenvalues come in conjugate pairs and are shown as a + bi, the one with the negative imaginary part first.",
    "Eigenvalues are found numerically: the Jacobi method for symmetric matrices, the QR algorithm otherwise. A repeated eigenvalue that is an exact root of the characteristic polynomial (checked in fractions) is shown exactly; other k-fold eigenvalues of a defective matrix are accurate to about 16 ÷ k significant figures.",
    "The characteristic polynomial and the determinant are exact: entries are read as fractions of their decimals.",
    "Each eigenvector has length 1; its first component of largest size is made real and positive.",
    "A repeated eigenvalue of a symmetric matrix gets orthonormal eigenvectors. For another matrix, an exactly found repeated eigenvalue gets a basis of its exact eigenspace, one vector per repeat while there are independent ones, then the last one again."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "m": {
        "title": "Matrix A",
        "description": "A square matrix, 2×2 to 6×6.",
        "type": "array",
        "items": {
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      }
    }
  },
  "outputs": {
    "values": {
      "label": "Eigenvalues",
      "description": "Every eigenvalue, repeated ones included, in ascending order of real part and then imaginary part.",
      "format": "text"
    },
    "lambda1": {
      "label": "λ1",
      "description": "Eigenvalue 1: a number, or text such as 1 + 2i.",
      "format": "number"
    },
    "vector1": {
      "label": "v1",
      "description": "A unit eigenvector for λ1.",
      "format": "text"
    },
    "lambda2": {
      "label": "λ2",
      "description": "Eigenvalue 2: a number, or text such as 1 + 2i.",
      "format": "number"
    },
    "vector2": {
      "label": "v2",
      "description": "A unit eigenvector for λ2.",
      "format": "text"
    },
    "lambda3": {
      "label": "λ3",
      "description": "Eigenvalue 3: a number, or text such as 1 + 2i.",
      "format": "number"
    },
    "vector3": {
      "label": "v3",
      "description": "A unit eigenvector for λ3.",
      "format": "text"
    },
    "lambda4": {
      "label": "λ4",
      "description": "Eigenvalue 4: a number, or text such as 1 + 2i.",
      "format": "number"
    },
    "vector4": {
      "label": "v4",
      "description": "A unit eigenvector for λ4.",
      "format": "text"
    },
    "lambda5": {
      "label": "λ5",
      "description": "Eigenvalue 5: a number, or text such as 1 + 2i.",
      "format": "number"
    },
    "vector5": {
      "label": "v5",
      "description": "A unit eigenvector for λ5.",
      "format": "text"
    },
    "lambda6": {
      "label": "λ6",
      "description": "Eigenvalue 6: a number, or text such as 1 + 2i.",
      "format": "number"
    },
    "vector6": {
      "label": "v6",
      "description": "A unit eigenvector for λ6.",
      "format": "text"
    },
    "note": {
      "label": "Note",
      "description": "Shown for a matrix that is not diagonalizable: a repeated eigenvalue with fewer independent eigenvectors than repeats.",
      "format": "text"
    },
    "polynomial": {
      "label": "Characteristic polynomial",
      "description": "det(λI − A), whose roots are the eigenvalues.",
      "format": "text"
    },
    "trace": {
      "label": "Trace",
      "description": "The sum of the diagonal, equal to the sum of the eigenvalues.",
      "format": "number"
    },
    "determinant": {
      "label": "Determinant",
      "description": "det(A), equal to the product of the eigenvalues.",
      "format": "number"
    },
    "steps": {
      "label": "Working",
      "description": "How the eigenvalues and eigenvectors are found.",
      "format": "text"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "m": [
        [
          1,
          2
        ],
        [
          0,
          3
        ]
      ]
    },
    "outputs": {
      "values": "1, 3",
      "lambda1": 1,
      "vector1": "[1, 0]",
      "lambda2": 3,
      "vector2": "[0.7071067812, 0.7071067812]",
      "polynomial": "λ² - 4λ + 3",
      "trace": 4,
      "determinant": 3,
      "steps": "Characteristic polynomial: det(λI − A) = λ² - 4λ + 3; its roots are λ = 1, 3; for each λ, solve (A − λI)v = 0 and scale v to length 1"
    },
    "text": "The eigenvalues are 1, 3."
  },
  "examples": [
    {
      "given": {
        "m": [
          [
            1,
            2
          ],
          [
            0,
            3
          ]
        ]
      },
      "expect": {
        "values": "1, 3",
        "lambda1": 1,
        "lambda2": 3,
        "vector1": "[1, 0]",
        "vector2": "[0.7071067812, 0.7071067812]",
        "polynomial": "λ² - 4λ + 3",
        "trace": 4,
        "determinant": 3
      },
      "source": "hand calculation in content.mdx: λ² − 4λ + 3 = (λ − 1)(λ − 3); v for 3 is (1, 1)/√2; Gilbert Strang, Introduction to Linear Algebra, 5th ed., §6.1 Introduction to Eigenvalues. https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_6-1.pdf"
    },
    {
      "given": {
        "m": [
          [
            1,
            0,
            0
          ],
          [
            0,
            2,
            0
          ],
          [
            0,
            0,
            3
          ]
        ]
      },
      "expect": {
        "values": "1, 2, 3",
        "vector1": "[1, 0, 0]",
        "vector2": "[0, 1, 0]",
        "vector3": "[0, 0, 1]",
        "determinant": 6
      },
      "source": "the eigenvalues of a diagonal matrix are its diagonal entries (Strang, Introduction to Linear Algebra, 5th ed., 6.1); Gilbert Strang, Introduction to Linear Algebra, 5th ed., §6.1 Introduction to Eigenvalues. https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_6-1.pdf"
    },
    {
      "given": {
        "m": [
          [
            4,
            1
          ],
          [
            2,
            3
          ]
        ]
      },
      "expect": {
        "values": "2, 5",
        "vector1": "[-0.4472135955, 0.894427191]",
        "vector2": "[0.7071067812, 0.7071067812]"
      },
      "source": "hand calculation in content.mdx: λ² − 7λ + 10 = (λ − 2)(λ − 5); Gilbert Strang, Introduction to Linear Algebra, 5th ed., §6.1 Introduction to Eigenvalues. https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_6-1.pdf"
    },
    {
      "given": {
        "m": [
          [
            0,
            -1
          ],
          [
            1,
            0
          ]
        ]
      },
      "expect": {
        "values": "-i, i",
        "lambda1": "-i",
        "lambda2": "i",
        "polynomial": "λ² + 1",
        "determinant": 1
      },
      "source": "rotation by 90°: λ² + 1 = 0 gives λ = ±i (Strang, Introduction to Linear Algebra, 5th ed., 6.1); Gilbert Strang, Introduction to Linear Algebra, 5th ed., §6.1 Introduction to Eigenvalues. https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_6-1.pdf"
    },
    {
      "given": {
        "m": [
          [
            2,
            1,
            0
          ],
          [
            1,
            2,
            1
          ],
          [
            0,
            1,
            2
          ]
        ]
      },
      "expect": {
        "lambda1": 0.5857864376269049,
        "lambda2": 2,
        "lambda3": 3.414213562373095,
        "vector2": "[0.7071067812, 0, -0.7071067812]",
        "polynomial": "λ³ - 6λ² + 10λ - 4"
      },
      "source": "hand calculation in content.mdx: (λ − 2)(λ² − 4λ + 2) = 0 gives 2 − √2, 2, 2 + √2; Gilbert Strang, Introduction to Linear Algebra, 5th ed., §6.1 Introduction to Eigenvalues. https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_6-1.pdf"
    },
    {
      "given": {
        "m": [
          [
            1,
            1
          ],
          [
            0,
            1
          ]
        ]
      },
      "expect": {
        "values": "1, 1",
        "vector1": "[1, 0]",
        "vector2": "[1, 0]",
        "polynomial": "λ² - 2λ + 1",
        "note": "λ = 1 repeats twice but has only 1 independent eigenvector. So A is not diagonalizable, and the same eigenvector is shown again for the missing ones."
      },
      "source": "hand calculation in content.mdx: (λ − 1)² = 0; (A − I)v = (v₂, 0) = 0 gives v = (1, 0); Gilbert Strang, Introduction to Linear Algebra, 5th ed., §6.1 Introduction to Eigenvalues. https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_6-1.pdf"
    },
    {
      "given": {
        "m": [
          [
            2,
            0,
            0,
            0
          ],
          [
            0,
            3,
            0,
            0
          ],
          [
            0,
            0,
            5,
            0
          ],
          [
            0,
            0,
            0,
            7
          ]
        ]
      },
      "expect": {
        "values": "2, 3, 5, 7",
        "polynomial": "λ⁴ - 17λ³ + 101λ² - 247λ + 210",
        "determinant": 210,
        "trace": 17
      },
      "source": "diagonal entries (Strang, Introduction to Linear Algebra, 5th ed., 6.1); (λ − 2)(λ − 3)(λ − 5)(λ − 7) expanded in content.mdx; Gilbert Strang, Introduction to Linear Algebra, 5th ed., §6.1 Introduction to Eigenvalues. https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_6-1.pdf"
    }
  ],
  "sources": [
    "Gilbert Strang, Introduction to Linear Algebra, 5th ed., §6.1 Introduction to Eigenvalues. https://math.mit.edu/~gs/linearalgebra/ila5/linearalgebra5_6-1.pdf"
  ],
  "related": [],
  "changelog": [
    {
      "date": "2026-09-28",
      "note": "A note names a repeated eigenvalue with too few eigenvectors; λ rows show 10 significant figures."
    },
    {
      "date": "2026-09-29",
      "note": "Worked examples name a published reference for their rule."
    }
  ]
}
