NumPy allowed · plain Python earns 10 bonus points
Computed matrix × vector transformation
Construct an orthonormal basis using the classical Gram-Schmidt orthogonalization process.
Implement gram_schmidt(vectors): sequentially project each vector onto the span of previously computed basis vectors, subtract projections to get orthogonal vector w, normalize w to unit length, and append to basis. Discard vectors whose remaining norm is < 1e-7. Round coordinates to 4 decimals.
gram_schmidt(vectors: list[list[float]]) -> list[list[float]]