Lab · Engineering Mathematics

Linear Algebra Lab

One matrix, optional right-hand-side data, and six numerical views of the same problem: solve it, take its determinant, invert it, factorise it, measure how sensitive it is, and look at its spectrum. They are related views, not interchangeable methods.

Matrix A

One row per line; entries separated by spaces or commas. Scientific notation such as 1.5e-3 is accepted. At most 10 × 10; ragged rows and blank entries are refused, never repaired.

Parsed A
Parsed A
10.50.3333
0.50.33330.25
0.33330.250.2

Right-hand side b

Needed only by the Solve workspace and the sensitivity experiment. Factorisation, conditioning and eigen-analysis are properties of A alone.

Parsed b
Parsed b
8
-11
-3

Presets

Matrix summary

Dimensions3 × 3
Shapesquare
Rank3 of 3
Rank statusfull rank
Symmetricyes
‖A‖₁1.833
‖A‖∞1.833
‖A‖_F1.414
det(A)4.630e-4

The determinant is secondary information. Singularity is decided from pivot magnitudes and singular values relative to the scale of the matrix, never from det(A) ≈ 0, which scales as cⁿ and would call 0.1·I singular in ten dimensions.

Condition — how sensitive is this matrix?

κ₁748
κ₂524.1
κ∞748
σ max1.408
σ min0.002687
rcond0.001908
Numerical rank3 of 3
Singular values, descending
Singular values, descending
1.408
0.1223
0.002687

κ₂ = σmax/σmin measures how much the matrix stretches some directions compared with others. A large κ means a small relative change in the data CAN produce a much larger relative change in the solution — a worst-case bound over all perturbation directions, not a prediction for yours. Run the experiment below to see what your own δb actually does.

Sensitivity experiment

Nothing is perturbed behind your back: the experiment runs only on the δb you enter here, and needs a b with a unique solution.

Supply both b and δb to compare the observed amplification with κ.

What this Lab models

One matrix A, an optional right-hand side b, and six numerical views of the same linear-algebra problem. Solving, the determinant, the inverse, factorising, conditioning and eigen-analysis are related views of one object, not interchangeable methods: factorisation is how the solve, the determinant and the inverse are all carried out, conditioning says how much to trust them, and the spectrum describes what the matrix does to directions rather than to one particular vector.

Model scope

  • · Matrices are at most 10 × 10. That is a product limit for a browser tool — URL sharing, mobile rendering and readable output — not a limit of the algorithms.
  • · Solving needs b; the determinant, the inverse, factorisation, conditioning and eigen-analysis are properties of A alone and stay available when b is empty.
  • · A non-zero determinant means A is invertible; it is not a conditioning measure. det(cA) = cⁿ det(A), so its magnitude changes with the units the matrix is written in while κ does not.
  • · The inverse is refused, not approximated, when a pivot is numerically zero. When it is produced, ‖A A⁻¹ − I‖∞ and ‖A⁻¹ A − I‖∞ verify it from both sides — as backward checks, never as a bound on the error of its entries.
  • · A solution is classified by rank, never by the determinant. A rank-deficient consistent system gets a particular solution plus a verified null-space basis, and an inconsistent one gets an honest refusal instead of a silent least-squares substitute.
  • · The residual b − Ax is not the forward error x_computed − x_true. The forward error is normally unknowable; conditioning is what connects the two.
  • · Every zero-pivot, rank and singularity decision uses a threshold proportional to eps and to a norm of the matrix, so nothing changes when A is rescaled.
  • · κ = ∞ for a singular matrix is a mathematical statement, not an overflow. It is shown as ∞ and never as a large invented number.
  • · The perturbation experiment uses only the δb you type. No hidden perturbation is applied anywhere in this Lab.
  • · A repeated eigenvalue does not guarantee a complete set of independent eigenvectors; where the geometric multiplicity is smaller, the matrix is reported as defective rather than diagonalised anyway.

Related calculations

Reading the presets

  • Well conditioned — A strictly diagonally dominant matrix: pivoting barely matters, κ is small, and the residual and the solution are both trustworthy.
  • Pivot required — The leading entry is exactly zero. Naive elimination divides by it and fails; partial pivoting swaps a row and solves the system without difficulty.
  • Singular but consistent — The second row is twice the first, and so is the right-hand side. rank(A) = rank([A|b]) = 1 < 2: infinitely many solutions, reported as a particular solution plus a null-space direction rather than as one invented answer.
  • Inconsistent — The same singular matrix with an incompatible right-hand side: rank(A) = 1 < rank([A|b]) = 2. No exact solution exists, and no least-squares fit is substituted for one.
  • Hilbert 4 × 4 — Nonsingular but famously ill conditioned: κ₂ is around 1.5 × 10⁴. Elimination still produces a tiny residual — which is exactly the point: a small residual does not mean the solution is insensitive to the data.
  • Rotation (complex pair) — A 90° rotation. Its eigenvalues are ±i: a real matrix with no real eigenvalue and genuinely complex eigenvectors. They are eigenvalues, not a statement about stability.
  • Defective Jordan block — λ = 1 with algebraic multiplicity 2 but geometric multiplicity 1 = nullity(A − λI). The matrix cannot be diagonalised, and no second independent eigenvector is fabricated to pretend otherwise.