{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"matrix-determinant"},"result":{"entity_type":"calculator","id":"matrix-determinant","calculator_id":"matrix-determinant","canonical_url":"https://tttkmbb.com/math/matrix-determinant","name":"Matrix Determinant Calculator","title":"Matrix Determinant Calculator – 2×2, 3×3 and 4×4 Determinants by Cofactor Expansion","category":"math","category_name":"Math","tool_name":"calculate_matrix_determinant","featured_mcp_tool":false,"description":"Computes the determinant of a 2×2, 3×3 or 4×4 matrix by Laplace (cofactor) expansion along the first row, and reports whether the matrix is singular, its trace and its rank.","use_when":"You need the determinant of a small square matrix, want to check whether it is invertible, or need its rank or trace.","do_not_use_when":"You need the inverse matrix itself (use matrix-inverse), want to solve equations (use linear-system), or the matrix is larger than 4×4.","inputs":[{"name":"matrix","label":"Matrix (row-major)","type":"number_list","required":true,"description":"All entries row by row: 4 values for 2×2, 9 for 3×3, 16 for 4×4. [[1, 2], [3, 4]] is entered as 1, 2, 3, 4.","example":[1,2,3,4]},{"name":"size","label":"Size n","type":"integer","required":false,"min":2,"max":4,"description":"Matrix dimension n (2, 3 or 4). Optional: inferred from the number of entries when omitted.","example":2}],"outputs":[{"name":"determinant","label":"Determinant","type":"number","decimals":6,"description":"det(A) by cofactor expansion along the first row."},{"name":"is_singular","label":"Singular","type":"boolean","decimals":4,"description":"true when the determinant is 0 (the matrix has no inverse)."},{"name":"expansion","label":"Cofactor expansion","type":"string","decimals":4,"description":"The first-row expansion with the numbers filled in, e.g. '1·4 − 2·3 = -2'; for 3×3 and 4×4 each term shows the entry times its minor."},{"name":"trace","label":"Trace","type":"number","decimals":6,"description":"Sum of the diagonal entries."},{"name":"rank","label":"Rank","type":"integer","decimals":0,"description":"Number of linearly independent rows (Gaussian elimination)."},{"name":"size","label":"Size","type":"integer","decimals":0,"description":"Dimension n of the matrix."}],"input_schema":{"type":"object","properties":{"matrix":{"description":"All entries row by row: 4 values for 2×2, 9 for 3×3, 16 for 4×4. [[1, 2], [3, 4]] is entered as 1, 2, 3, 4.","type":"array","items":{"type":"number"},"minItems":4,"examples":[[1,2,3,4]]},"size":{"description":"Matrix dimension n (2, 3 or 4). Optional: inferred from the number of entries when omitted.","type":"integer","minimum":2,"maximum":4,"examples":[2]}},"additionalProperties":false,"required":["matrix"]},"output_schema":{"type":"object","properties":{"determinant":{"description":"det(A) by cofactor expansion along the first row.","type":"number"},"is_singular":{"description":"true when the determinant is 0 (the matrix has no inverse).","type":"boolean"},"expansion":{"description":"The first-row expansion with the numbers filled in, e.g. '1·4 − 2·3 = -2'; for 3×3 and 4×4 each term shows the entry times its minor.","type":"string"},"trace":{"description":"Sum of the diagonal entries.","type":"number"},"rank":{"description":"Number of linearly independent rows (Gaussian elimination).","type":"integer"},"size":{"description":"Dimension n of the matrix.","type":"integer"}}},"formula":"2×2: det = a·d − b·c; n×n: det = Σ_j (−1)^(1+j) · a_1j · M_1j, where M_1j is the determinant of the matrix without row 1 and column j (Laplace expansion)","sources":[{"name":"Wikipedia – Determinant","url":"https://en.wikipedia.org/wiki/Determinant","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wikipedia – Laplace expansion","url":"https://en.wikipedia.org/wiki/Laplace_expansion","type":"reference","retrieved_at":"2026-09-24"},{"name":"Wolfram MathWorld – Determinant","url":"https://mathworld.wolfram.com/Determinant.html","type":"reference","retrieved_at":"2026-09-24"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"[[1, 2], [3, 4]]","inputs":{"matrix":[1,2,3,4],"size":2},"expected":{"determinant":-2,"is_singular":false,"expansion":"1·4 − 2·3 = -2","trace":5,"rank":2,"size":2},"url":"https://tttkmbb.com/api/v1/calculate/matrix-determinant?matrix=1%2C2%2C3%2C4&size=2"},{"name":"[[6, 1, 1], [4, -2, 5], [2, 8, 7]]","inputs":{"matrix":[6,1,1,4,-2,5,2,8,7]},"expected":{"determinant":-306,"is_singular":false,"expansion":"6·(-54) − 1·(18) + 1·(36) = -306","trace":11,"rank":3,"size":3},"url":"https://tttkmbb.com/api/v1/calculate/matrix-determinant?matrix=6%2C1%2C1%2C4%2C-2%2C5%2C2%2C8%2C7"}],"faq":[{"q":"What does a zero determinant mean?","a":"The rows (and columns) are linearly dependent: the matrix has no inverse, and the linear system it represents has no unique solution. The rank output shows how many independent rows remain."},{"q":"Is the result exact?","a":"For integer entries the cofactor expansion uses only integer multiplications and additions, so the determinant is exact as long as intermediate products stay below 2^53."}],"tags":["determinant","matrix determinant","3x3 determinant","4x4 determinant","cofactor expansion","singular matrix"],"related":[{"calculator_id":"matrix-inverse","reason":"Inverse and adjugate of the same matrix."},{"calculator_id":"linear-system","reason":"Cramer's rule uses these determinants to solve equations."},{"calculator_id":"vector-operations","reason":"The 3D cross product is a 3×3 determinant."}],"links":{"html":"https://tttkmbb.com/math/matrix-determinant","markdown":"https://tttkmbb.com/math/matrix-determinant.md","json":"https://tttkmbb.com/math/matrix-determinant.json","api":"https://tttkmbb.com/api/v1/calculate/matrix-determinant","schema":"https://tttkmbb.com/api/v1/calculators/matrix-determinant","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-24"},"timestamp":"2026-09-24T01:59:09Z","next_actions":[{"tool":"run_calculator","calculator_id":"matrix-determinant","reason":"Run Matrix Determinant Calculator with the inputs above."}],"links":{"markdown":"https://tttkmbb.com/math/matrix-determinant.md"}}