Adjoint matrix calculator
For the matrix with rows (2, 1) and (1, 3), the adjoint has rows (3, −1) and (−1, 2) and the determinant is 5. It works for any square matrix up to 32 by 32, singular ones included. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Runs in your browser. Free, unlimited — your data never leaves this page.
Unlike the inverse, the adjoint exists for every square matrix, including singular ones, because the identity A times adj(A) equals det(A) times the identity always holds. For a two-by-two matrix the recipe is famous: swap the diagonal entries and negate the off-diagonal ones. For larger orders this calculator computes every cofactor minor with closed formulas for the small blocks and LU factorization with partial pivoting for the rest, up to thirty-two by thirty-two. Send a nested array of finite real numbers and receive the cleaned adjoint matrix, the determinant, a singularity flag, the method used, and a short formula string. Non-square, empty, non-numeric, or oversized inputs are rejected with a clear validation error instead of a silent wrong answer.
How the adjoint matrix is computed
Begin with an n by n array of finite real numbers. The capability first validates the structure: every row must be an array whose length equals the number of rows, the grid must be non-empty, and the dimension must not exceed thirty-two. The adjugate is then built entry by entry from cofactors.
The cofactor C[i][j] is (−1) raised to i plus j, times the determinant of the minor that remains after deleting row i and column j, and the adjoint is the transpose of that cofactor matrix, so adj(A)[i][j] equals C[j][i]. For a one-by-one matrix the convention adj([a]) equals [1] is applied, which keeps the identity A times adj(A) equals det(A) times I true even in the scalar corner. For two-by-two inputs the cofactor construction collapses to the familiar swap-and-negate pattern: the adjoint of [[a,b],[c,d]] is [[d,−b],[−c,a]], so the response is exact.
For larger orders each minor determinant is evaluated with closed formulas for blocks up to three by three and LU factorization with partial pivoting beyond that, which keeps the arithmetic deterministic and numerically stable without any probabilistic step. Entries may arrive as numbers or numeric strings; NaN and Infinity fail validation.
Where the adjoint matrix shows up in real work
Linear algebra courses assign cofactor and adjugate drills constantly, because the adjoint is the bridge between determinants and inverses: when det(A) is nonzero, A inverse equals adj(A) divided by det(A). A trusted oracle that returns the full adjugate speeds grading, demo preparation, and answer-key generation. Symbolic and computer-algebra work uses the adjoint to express inverses over polynomial rings and to prove identities such as Cramer's rule, where each solution component is a ratio of determinants derived from adj(A) times b.
In geometry and computer graphics the adjugate of the upper-left block of a transformation relates to normal-vector transport under non-uniform scaling, and engineers check the identity A times adj(A) equals det(A) times I as a cheap consistency probe before attempting a costlier inversion. Singular matrices are common in rank-deficient least-squares preflights, and the adjoint remains well defined there, which makes it a safe diagnostic where an inverse would simply fail.
If you later need determinants, inverses, eigenvalues, or rank, treat those as separate search intents and landings rather than overloading this adjoint calculator page.
What you can do with it
Homework and exam answer keys
Generate adj(A), determinants, and singularity flags for textbook 2×2, 3×3, and small n×n sets so teachers and auto-graders share one ground truth.
Inverse derivation and Cramer's rule
Obtain adj(A) as the numerator of A⁻¹ = adj(A)/det(A) and as the engine behind Cramer's rule in symbolic exercises and proof checkers.
Singular-matrix diagnostics
Compute the adjugate where an inverse does not exist and verify the identity A·adj(A) = det(A)·I as a preflight before costlier factorizations.
FAQ
What is the difference between adjoint and adjugate?
In this context they are the same thing: the transpose of the cofactor matrix, sometimes called the classical adjoint. It should not be confused with the conjugate transpose, which is a different object over complex matrices.
Does the adjoint exist if the matrix is singular?
Yes. The adjugate is defined for every square matrix because it only requires minors and their determinants. The identity A·adj(A) = det(A)·I still holds; for singular matrices the right-hand side is the zero matrix.
What happens if the matrix is not square?
The cofactor construction needs a row and a column for every entry, so jagged rows or unequal row versus column counts are rejected with a message that names the failing row.
What is the maximum matrix size?
n ≤ 32. Each cofactor minor is evaluated with closed formulas or LU factorization; classroom and contest sizes are fully covered on the free parse path.
What does it cost?
The browser tool is free and runs locally.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/math/adjoint-matrix \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"matrix":[[2,1],[1,3]]}'const res = await fetch("https://api.kit.forhosting.com/math/adjoint-matrix", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"matrix": [
[
2,
1
],
[
1,
3
]
]
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/math/adjoint-matrix",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"matrix": [
[
2,
1
],
[
1,
3
]
]
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/math/adjoint-matrix", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"matrix":[[2,1],[1,3]]}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"matrix":[[2,1],[1,3]]}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/math/adjoint-matrix", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"matrix": [
[
2,
1
],
[
1,
3
]
]
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "math.adjoint_matrix",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
The adjoint of a square matrix, also called the adjugate or classical adjoint, is the transpose of its cofactor matrix: each entry is a signed determinant of the submatrix left after deleting one row and one column.
How the adjoint matrix is computed
All arithmetic is pure floating-point code with no random seeds, no wall-clock timestamps, no network calls, and no model drift, so identical matrices always produce byte-identical JSON. The response reports the cleaned adjoint with stable twelve-significant-digit rounding, the dimension n, the determinant computed once for context, a boolean is_singular flag, the method label, and a human-readable formula string stating the cofactor identity used.
What you send and what you get back
Every row must have the same length, and that length must equal the number of rows so the matrix is square. Classic textbook checks include the two-by-two matrix with rows two one and one three whose adjoint is [[3,−1],[−1,2]], the three-by-three example [[1,2,3],[0,1,4],[5,6,0]] whose adjoint is [[−24,18,5],[20,−15,−4],[−5,4,1]], and a singular matrix whose adjoint still exists and satisfies A times adj(A) equals the zero matrix. Send one required field named matrix: either a nested JSON array of rows of finite numbers, such as two comma one then one comma three for the classic two-by-two case, or a JSON string encoding the same nested array. Missing matrix, non-array shapes, jagged rows, non-numeric cells, NaN, Infinity, empty grids, and dimensions larger than thirty-two by thirty-two fail with invalid_input and are not charged. On success the response echoes the cleaned input matrix, the integer dimension n, the adjoint matrix as a nested array of the same shape, the determinant, an is_singular flag, method as one of trivial_1x1, cofactor_closed_2x2, or cofactor_minors_lu, and a short formula string recalling that adj(A) is the transpose of the cofactor matrix and that A times adj(A) equals det(A) times the identity. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.
Where the adjoint matrix shows up in real work
Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.