FAILURE MAP
← Case archive

FA-6081 / Linear algebra / Open access

Two by two characteristic coefficients · case 01

The trace coefficient has the wrong sign.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The trace coefficient has the wrong sign.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return [m[0][0]*m[1][1]-m[0][1]*m[1][0],-m[0][0]-m[1][1],1]

Unsuccessful approach: Coefficients are emitted in descending rather than ascending power order.

Case contract

Integer matrix/vector entries, rectangular rows, compatible multiplication dimensions, and square matrices for determinant, trace, inverse, symmetry and characteristic-polynomial operations. Rational matrix outputs are reduced Fraction strings. Return coefficients of det(lambda*I-m) in ascending power order. Exact operational definition: [m[0][0]*m[1][1]-m[0][1]*m[1][0],-m[0][0]-m[1][1],1]

Why this case matters

Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Linear algebra results depend on the stated convention.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(m):
    return [m[0][0]*m[1][1]-m[0][1]*m[1][0],m[0][0]+m[1][1],1]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([[1, 0], [0, 2]],)', solve(*([[1, 0], [0, 2]],)), [2, -3, 1])
check('fixture 2: ([[0, 1], [-1, 0]],)', solve(*([[0, 1], [-1, 0]],)), [1, 0, 1])
check('fixture 3: ([[0, 0], [0, 0]],)', solve(*([[0, 0], [0, 0]],)), [0, 0, 1])
check('fixture 4: ([[2, 1], [3, 4]],)', solve(*([[2, 1], [3, 4]],)), [5, -6, 1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: ([[1, 0], [0, 2]],)[2, 3, 1][2, -3, 1]Failed
fixture 2: ([[0, 1], [-1, 0]],)[1, 0, 1][1, 0, 1]Passed
fixture 3: ([[0, 0], [0, 0]],)[0, 0, 1][0, 0, 1]Passed
fixture 4: ([[2, 1], [3, 4]],)[5, 6, 1][5, -6, 1]Failed

SHA-256 / a30f8f09836deed31bf0b605f2ef2b2aa8fcb9206b73724648843283bc4f8dcf

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(m):
    return [1,-m[0][0]-m[1][1],m[0][0]*m[1][1]-m[0][1]*m[1][0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([[1, 0], [0, 2]],)', solve(*([[1, 0], [0, 2]],)), [2, -3, 1])
check('fixture 2: ([[0, 1], [-1, 0]],)', solve(*([[0, 1], [-1, 0]],)), [1, 0, 1])
check('fixture 3: ([[0, 0], [0, 0]],)', solve(*([[0, 0], [0, 0]],)), [0, 0, 1])
check('fixture 4: ([[2, 1], [3, 4]],)', solve(*([[2, 1], [3, 4]],)), [5, -6, 1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: ([[1, 0], [0, 2]],)[1, -3, 2][2, -3, 1]Failed
fixture 2: ([[0, 1], [-1, 0]],)[1, 0, 1][1, 0, 1]Passed
fixture 3: ([[0, 0], [0, 0]],)[1, 0, 0][0, 0, 1]Failed
fixture 4: ([[2, 1], [3, 4]],)[1, -6, 5][5, -6, 1]Failed

SHA-256 / 57140c437a2ff4901639a79729cf12da33dc358f6fbc996cf73faae3d2b5d53a

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR

N = 1
observations = []
def solve(m):
    return [m[0][0]*m[1][1]-m[0][1]*m[1][0],-m[0][0]-m[1][1],1]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([[1, 0], [0, 2]],)', solve(*([[1, 0], [0, 2]],)), [2, -3, 1])
check('fixture 2: ([[0, 1], [-1, 0]],)', solve(*([[0, 1], [-1, 0]],)), [1, 0, 1])
check('fixture 3: ([[0, 0], [0, 0]],)', solve(*([[0, 0], [0, 0]],)), [0, 0, 1])
check('fixture 4: ([[2, 1], [3, 4]],)', solve(*([[2, 1], [3, 4]],)), [5, -6, 1])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1: ([[1, 0], [0, 2]],)[2, -3, 1][2, -3, 1]Passed
fixture 2: ([[0, 1], [-1, 0]],)[1, 0, 1][1, 0, 1]Passed
fixture 3: ([[0, 0], [0, 0]],)[0, 0, 1][0, 0, 1]Passed
fixture 4: ([[2, 1], [3, 4]],)[5, -6, 1][5, -6, 1]Passed

SHA-256 / cded72a0508eae5904637a075da0f07e327cf2d0b14e669357d5d1cef456a25b

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:37:57.096668+00:00.

Case digest / a0fd9e60374ba765eccce6adca516348b5d4bff16e90b4456cf39f4c80e646cb