ForHosting KIT · Math

Eigenvalue and eigenvector calculator

The matrix with rows (2, 1) and (1, 2) has eigenvalues 3 and 1, each paired with its unit eigenvector. Enter any square matrix up to 50×50 and get all its real eigenpairs, largest first, without expanding a polynomial by hand. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

The eigenvalue and eigenvector calculator takes a square matrix — up to 50×50, entered row by row — and returns its complete set of real eigenpairs: every eigenvalue together with its corresponding eigenvector, normalized to unit length and ordered from the largest eigenvalue to the smallest. Eigenpairs are the fingerprint of a linear transformation: they tell you which directions it leaves unchanged and by how much it stretches each one, and they underpin everything from vibration analysis and stability checks to PageRank, Markov chains and principal component analysis. Instead of expanding the characteristic polynomial by hand or wiring up a numerical library, you send the entries and get the eigenpairs back in one deterministic call, rounded to the precision you choose. The same module runs free in your browser on this page, so you only pay when you automate the workflow.

What an eigenpair tells you

An eigenvector of a square matrix A is a non-zero vector that A merely scales: A·v = λ·v for some scalar λ, the eigenvalue. Geometrically, an eigenvector points along an axis that the transformation does not rotate or shear — it only stretches or compresses along that axis, by the factor λ. A pair (λ, v) is called an eigenpair, and the eigenvalue and eigenvector calculator returns exactly that: one record per eigenvalue containing the eigenvalue itself and its matching unit eigenvector, so the correspondence can never be misread.

Pairs are sorted from the largest eigenvalue to the smallest, which puts the dominant direction of the system first — the one that governs long-term behavior in iterative processes. Negative eigenvalues encode a flip of direction, a zero eigenvalue reveals a non-trivial null space and a non-invertible matrix, and repeated eigenvalues flag symmetries in the problem.

How the computation works

The algorithm is fully deterministic — no random starting vectors, no iteration counts that vary from run to run — so the same matrix always returns the same eigenpairs, byte for byte. Symmetric matrices, which appear constantly in covariance analysis, structural mechanics and optimization, are processed with cyclic Jacobi sweeps: a fixed sequence of plane rotations that zeroes the off-diagonal entries while accumulating the rotations into the eigenvector matrix.

Jacobi is not the fastest method in theory, but it is remarkably accurate at the small and medium sizes this tool accepts and it handles repeated eigenvalues gracefully, where simpler power methods fail. General non-symmetric matrices are handled with a Wilkinson-shifted QR iteration to extract the eigenvalues, followed by inverse iteration against the original matrix to recover one eigenvector per eigenvalue. Every eigenvalue and every eigenvector entry is rounded to the decimal precision you request, from 0 to 15 places, with ten as the default.

Where eigenpairs are used

Eigenpairs appear wherever a linear system evolves or vibrates. In engineering, the natural frequencies of a structure are the square roots of the eigenvalues of its stiffness-mass system, and the eigenvectors are the mode shapes — how the structure moves at each frequency. Web search owes its existence to an eigenpair: PageRank is the dominant eigenvector of the web's link matrix.

Markov chain analysis works the same way — the dominant eigenvalue tells you whether the chain converges and its eigenvector is the steady state.

Find principal components

Send a covariance matrix and read the eigenpairs directly: eigenvectors are the principal directions, eigenvalues the explained variance.

Analyze vibrations and stability

Extract the natural frequencies and mode shapes of a mechanical system from its stiffness matrix, or check whether a linear system is stable from the sign of its eigenvalues.

Check homework and research

Verify a hand-worked eigendecomposition against a deterministic reference before submitting it, with precision you control.

What matrices are accepted?

Any square matrix of real, finite numbers up to 50×50.

What if my matrix has complex eigenvalues?

Matrices with complex eigenvalues, and defective matrices without a full set of independent real eigenvectors, are rejected with a clear error rather than an approximate answer.

How are the eigenpairs ordered?

From the largest eigenvalue to the smallest. Each eigenpair carries its own eigenvector, normalized to unit length, so the pairing is unambiguous.

How do I verify an answer?

Multiply the matrix by each returned eigenvector: the result should equal the eigenvalue times that eigenvector (A·v = λ·v), up to the rounding precision you chose.

What happens with a matrix that cannot be diagonalized?

If the matrix lacks a full set of independent eigenvectors, as with rows (1, 1) and (0, 1), you get a clear message instead of a plausible-looking wrong answer. Complex eigenvalues are reported the same way.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/math/eigenvalue-eigenvector

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/math/eigenvalue-eigenvector \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"matrix":[[2,1],[1,2]]}'
{
  "matrix": [
    [
      2,
      1
    ],
    [
      1,
      2
    ]
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "math.eigenvalue_eigenvector",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_n50
max_abs_entry1000000000000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

What an eigenpair tells you

If the matrix is not square the request is rejected outright, because eigenpairs are only defined for square matrices, and if the matrix has complex eigenvalues the tool says so instead of fabricating real numbers.

How the computation works

Before returning, the tool verifies that the recovered eigenvectors are linearly independent; if they are not — as with the classic defective matrix [[1,1],[0,1]] — the request fails with a clear error rather than a plausible-looking wrong answer.

Where eigenpairs are used

In data science, principal component analysis is nothing more than the eigendecomposition of a covariance matrix: the eigenvectors are the principal directions and the eigenvalues measure how much variance each one captures. Because the capability runs on our global edge with nothing stored after the response, it also fits cleanly into automated pipelines: a script can submit matrices as part of a nightly job for $0.002 per call, while a human checks the same matrices free in the browser with byte-identical results. That parity between the free web tool and the paid API is deliberate — the same module powers both channels.

What does it cost?

$0.002 per request via the API. It is also free to run in your browser on this page, with identical results.

Read the full KIT documentation →