NumPy allowed · plain Python earns 10 bonus points
Computed matrix × vector transformation
Compute the determinant of 1x1, 2x2, or 3x3 square matrices.
Implement matrix_determinant(A): calculate det(A) for matrices of dimension up to 3x3 using direct algebraic formulas / Laplace cofactor expansion. Round result to 4 decimals.
matrix_determinant(A: list[list[float]]) -> float