ForHosting KIT · Math

Matrix inverse calculator

Enter rows 4, 7 and 2, 6 to get the inverse with rows 0.6, −0.7 and −0.2, 0.4, plus the determinant 10. A singular matrix is refused instead of being given a made-up inverse. Free in your browser.

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

Runs in your browser. Free, unlimited — your data never leaves this page.

This matrix inverse calculator finds the inverse of a square real matrix A using Gauss-Jordan elimination on the augmented system of A beside the identity. The engine is fully deterministic: partial pivoting, row scaling, and elimination use only finite floating-point arithmetic with no network calls, no sampling, and no date-dependent shortcuts. Classic checks include the two-by-two matrix with rows four seven and two six, whose inverse has rows zero point six negative zero point seven and negative zero point two zero point four with determinant ten, and the identity matrix, which is its own inverse.

Where matrix inverses fit in study, science, and software

Students meet matrix inversion when a linear algebra course moves from row reduction to linear maps, when a contest problem asks for A inverse of a small integer matrix, or when they check that A times A inverse is the identity before trusting a hand calculation. Teachers can pre-generate answer keys for modest n without trusting opaque calculator apps that silently switch to a pseudoinverse or drop signs on cofactors.

Developers call the same contract from scripts to seed deterministic test vectors for solvers, to normalize user-entered coefficient matrices before least-squares demos, or to satisfy programming-challenge statements that demand A inverse rather than a hand-waved sketch. Engineering and data practice often needs a fast, offline inverse of a small square system so units and scale factors can be checked without a full CAS under time pressure.

Product and education tools use the inverse when a learner types a square matrix and the UI must show A inverse beside the determinant and method.

Homework and inverse checks

Invert textbook square matrices by Gauss-Jordan and verify A·A⁻¹ = I before exams or graphing linear maps.

Solvers and tutoring software

Normalize user-entered square coefficient matrices into A⁻¹ for linear demos, step helpers, and interactive lessons.

What does the matrix inverse calculator cost?

It is free in your browser on this page.

How is the inverse computed?

By Gauss-Jordan elimination: form the augmented matrix [A|I], use partial pivoting, row-reduce until the left block is I, and read A⁻¹ from the right block. The determinant is the product of pivots times the sign of row swaps.

What happens if the matrix is singular?

A zero (or numerically zero) determinant means no two-sided inverse exists; this tool does not return a pseudoinverse.

Does this work for non-square matrices?

No. Only square n×n matrices are accepted. Rectangular matrices have no two-sided inverse of the same shape.

Why are results rounded to a precision?

Default precision is 10 decimal places; you can set precision from 0 to 15.

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/algebra/matrix-inverse

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/algebra/matrix-inverse \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"matrix":[[4,7],[2,6]]}'
{
  "matrix": [
    [
      4,
      7
    ],
    [
      2,
      6
    ]
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "algebra.matrix_inverse",
  "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.

When A is invertible, the left block becomes the identity and the right block is A inverse; when A is singular the determinant is zero and no two-sided inverse exists, so the request is rejected with a clear invalid input error instead of a fabricated pseudoinverse.

What matrix inversion means and what the response contains

The inverse of a square matrix A is the unique matrix A inverse such that A times A inverse and A inverse times A both equal the identity of the same size. Existence is equivalent to a non-zero determinant: if det of A is zero, the rows or columns are linearly dependent, the linear map collapses a non-trivial direction, and no two-sided inverse can undo that collapse. This calculator builds the augmented matrix of A beside the identity, then applies Gauss-Jordan elimination with partial pivoting so the left block becomes the identity and the right block becomes A inverse whenever every pivot stays numerically non-zero. The response returns the inverse matrix rounded to the requested precision, an echo of the input matrix, the dimension n, the determinant assembled from the product of pivots and the sign of row swaps, the method tag gauss_jordan, the precision used, a short formula reminder, and the maximum supported n. There is no approximate symbolic CAS path and no random sampling of entries: the engine either finishes the elimination inside the supported size and magnitude limits or rejects the input with invalid_input. Rejected cases include a missing matrix, non-array rows, non-square shapes, non-finite entries, magnitudes above the documented ceiling, and any singular matrix where a pivot collapses to zero or the determinant is numerically zero.

How the matrix is read and how the inverse stays reproducible

Optional leading plus signs and scientific notation on entry strings are allowed when they parse as finite decimals; embedded spaces, hex prefixes, and non-numeric tokens are rejected with a clear message so a bad cell does not become a wrong inverse. Non-square input fails immediately with a message that names the row whose column count disagrees with n. The preferred field is matrix, a nested array of rows of finite numbers with the same number of columns as rows, but aliases a, A, and mat are accepted so spreadsheets, query strings, and typed forms can reuse the same contract. An optional precision field, with aliases decimals and dp, chooses how many decimal places to expose for every inverse entry and for the determinant, defaulting to ten and capped at fifteen so JSON goldens stay stable. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing Gauss-Jordan yourself.

Where matrix inverses fit in study, science, and software

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the mathematical result. Pair it with matrix multiplication or determinant tools when you need related linear algebra steps, and with other math endpoints when you are building a small lab of free, deterministic algebra helpers.

Deterministic test fixtures

Generate reproducible A⁻¹ and determinant values for unit tests, property checks, and CI assertions.

Read the full KIT documentation →