FAILURE MAP
← Case archive

FA-6041 / Linear algebra / Open access

Outer product shape · case 01

The outer product axes are reversed.

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

ROOT CAUSE

The outer product axes are reversed.

VERIFIED REPAIR

Apply the specified mathematical contract directly, preserving all terms and boundary cases: return [[x*y for y in b] for x in a]

Unsuccessful approach: Outer pairwise addition replaces multiplication.

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. Outer product shape. Exact operational definition: [[x*y for y in b] for x in a]

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(a, b):
    return [[x*y for x in a] for y in b]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 2], [3, 4, 5])', solve(*([1, 2], [3, 4, 5])), [[3, 4, 5], [6, 8, 10]])
check('fixture 2: ([0], [2, 3])', solve(*([0], [2, 3])), [[0, 0]])
check('fixture 3: ([], [1])', solve(*([], [1])), [])
check('fixture 4: ([2], [3])', solve(*([2], [3])), [[6]])
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, 2], [3, 4, 5])[[3, 6], [4, 8], [5, 10]][[3, 4, 5], [6, 8, 10]]Failed
fixture 2: ([0], [2, 3])[[0], [0]][[0, 0]]Failed
fixture 3: ([], [1])[[]][]Failed
fixture 4: ([2], [3])[[6]][[6]]Passed

SHA-256 / aed3f50a33d5cb62130dd5fc0eaeb017f2beeb0e02c237fb488695ded2606357

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(a, b):
    return [[x+y for y in b] for x in a]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 2], [3, 4, 5])', solve(*([1, 2], [3, 4, 5])), [[3, 4, 5], [6, 8, 10]])
check('fixture 2: ([0], [2, 3])', solve(*([0], [2, 3])), [[0, 0]])
check('fixture 3: ([], [1])', solve(*([], [1])), [])
check('fixture 4: ([2], [3])', solve(*([2], [3])), [[6]])
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, 2], [3, 4, 5])[[4, 5, 6], [5, 6, 7]][[3, 4, 5], [6, 8, 10]]Failed
fixture 2: ([0], [2, 3])[[2, 3]][[0, 0]]Failed
fixture 3: ([], [1])[][]Passed
fixture 4: ([2], [3])[[5]][[6]]Failed

SHA-256 / 1cc235ff20ec171f57a49d578fb1027b7803c73fee1c76b83a79085b6cc4da01

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(a, b):
    return [[x*y for y in b] for x in a]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([1, 2], [3, 4, 5])', solve(*([1, 2], [3, 4, 5])), [[3, 4, 5], [6, 8, 10]])
check('fixture 2: ([0], [2, 3])', solve(*([0], [2, 3])), [[0, 0]])
check('fixture 3: ([], [1])', solve(*([], [1])), [])
check('fixture 4: ([2], [3])', solve(*([2], [3])), [[6]])
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, 2], [3, 4, 5])[[3, 4, 5], [6, 8, 10]][[3, 4, 5], [6, 8, 10]]Passed
fixture 2: ([0], [2, 3])[[0, 0]][[0, 0]]Passed
fixture 3: ([], [1])[][]Passed
fixture 4: ([2], [3])[[6]][[6]]Passed

SHA-256 / ea12125ee368a1c6e1c7b739d4e0f206ac75e4c722fba17b70a6cde017c731c2

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:56.900092+00:00.

Case digest / 715a935fe89c2ed825608896d938f8d8d2b8ac90226268e1575edf58705257a5