Statistical Methods

Audit a Lower-Triangular Linear Solve

Define the task

A triangular solve appears inside many regression and covariance algorithms. Auditing it can reveal an incorrect matrix orientation or a wrongly assumed unit diagonal. This tool solves a small real lower-triangular system Lx=b using its supplied diagonal. It does not invert a matrix, fit a regression or determine whether an upstream factorization was appropriate. Preserve row order and the numerical scale of both coefficients and right-hand side.

Carry out the check

Starting with the first row, subtract contributions from already solved components, then divide by the current diagonal coefficient. Repeat downward. The tool rejects nonzero entries above the diagonal, zero diagonal entries and nonfinite results. It reports the maximum absolute residual in Lx−b as an arithmetic check. A small residual alone does not prove a stable solution: an ill-conditioned system can greatly amplify small input changes. Do not silently replace a small diagonal with one.

Worked hypothetical example

For fictional L with rows (2,0) and (3,4), and b=(2,11), the first component is 1 and the second is (11−3)/4=2. Multiplication reconstructs (2,11) exactly in this simple example. The teaching tool accepts the matrix rows followed by one right-hand-side row. For a real analysis, retain the factorization method, precision and conditioning assessment alongside the solution. Transpose and upper-triangular conventions require a different operation and are not inferred automatically.

Method checked 19 November 2026 against Primary method documentation: solve_triangular.

Open the lower-triangular solve audit.

Related reading

Reading path: Analyze data. Guide 177 of 182. Choose any guide to suit your project.

Statistical Methods

Assess sensitivity before trusting a two-variable linear solve

Assess sensitivity of a small linear system to its inputs. Includes a worked matrix example and reproducibility checks.

Statistical Methods

Audit what a linear detrending step removes

Separate baseline removal from evidence of a physiological trend.

Browse this reading pathTools for this stageGuides and downloads for this stage