HuntsvilleEngineers mark
HE Reference Shelf — huntsvilleengineers.com
The Reference Shelf · Linear Algebra & Numerical Methods

Positive definite matrices

A symmetric matrix that behaves like a physical spring — load it in any direction and it stores positive energy — which is why stiffness and covariance matrices earn the fastest solvers and the strongest guarantees in numerical work.

Also known as: positive semidefinite · SPD matrices

The formula (the core equation(s), each with a one-line reading of what it says)

xᵀ·A·x > 0   for every x ≠ 0     (A symmetric)

Reads: no matter which direction you push, the quadratic form — twice the stored energy for a stiffness matrix — comes back positive; that single inequality is the whole definition.

A positive definite  ⇔  every eigenvalue λᵢ(A) > 0

Reads: an SPD matrix stretches every direction by a positive amount and flips none of them — the energy bowl ½·xᵀ·A·x curves up along every axis.

det(A₁) > 0,  det(A₂) > 0,  …,  det(Aₙ) > 0     (leading principal minors)

Reads: Sylvester's criterion — check the determinant of the top-left 1×1, 2×2, … n×n blocks; all positive means positive definite, and it's the practical hand test for small matrices.

A = L·Lᵀ     (L lower triangular, positive diagonal)

Reads: the Cholesky factorization exists exactly when A is SPD — a "square root" of the matrix — and computing it costs n³/3 flops, half the price of LU, with no pivoting needed.

f(x) = ½·xᵀ·A·x − bᵀ·x   has a unique minimum at  A·x = b

Reads: positive definiteness is what turns "solve the system" into "find the bottom of a bowl" — one minimum, no saddle, no ridge — the guarantee under least squares, LQR, and every Newton step with a good Hessian.

xᵀ·A·x ≥ 0     (positive SEMIdefinite: zero allowed)

Reads: the boundary case — some directions store no energy at all — and those zero-energy directions are physical, like the rigid-body modes of an unconstrained structure.

Where you meet it (2-4 concrete engineering situations, specific: bench, test stand, review board)

The FEA run that dies at the solver. NASTRAN and ANSYS factor the assembled stiffness matrix with a Cholesky-family method because a properly constrained structure's K is SPD — strain energy ½·uᵀ·K·u is positive for any deformation. When the log says "matrix is not positive definite," the code is telling you the model can move without storing energy: a missing constraint, an unattached part, a mechanism, or a collapsed element. The error message is a free model check.

The tracker that diverges on the second day of test. A Kalman filter's covariance P is positive semidefinite by definition — it's a matrix of variances. But the textbook update P = P − K·H·P subtracts two nearly equal matrices, and after enough cycles in fixed- or single-precision, P picks up a negative eigenvalue. The filter then believes it has negative uncertainty, gains blow up, and the track walks off the target. Square-root and UDU filters exist specifically to make losing definiteness impossible.

The calibration fit on the bench. Every least-squares fit — thermocouple polynomial, strain-gauge bridge cal, antenna pattern fit — runs through the normal equations AᵀA·x = Aᵀb, and AᵀA is always positive semidefinite, strictly definite when the fit is actually determined. A near-singular AᵀA means your test points don't separate the coefficients, and the caveat is that AᵀA squares the condition number of A — which is why good codes use QR instead.

The stability slide at the design review. The certificate that closes a control-loop argument is a Lyapunov matrix: find P > 0 with AᵀP + P·A < 0 and the system is provably stable. "P is positive definite" on that slide is not decoration — it is the entire proof, and LQR design carries the same fine print (Q semidefinite, R strictly definite, or the optimization has no unique answer).

How it works (the real substance — behavior, gotchas, limits of validity, the mistake people make)

Run the small honest example. Two masses on springs of k = 1000 N/m, one anchored to the wall:

K = [ 2000  -1000 ]    eigenvalues: 382 and 2618  →  positive definite
    [-1000   1000 ]

Cholesky gives L = [[44.72, 0], [−22.36, 22.36]] and L·Lᵀ reproduces K exactly. Now cut the wall spring: K = [[1000, −1000], [−1000, 1000]] has eigenvalues 0 and 2000 — semidefinite only. The zero eigenvalue's direction is (1, 1): both masses translating together, storing nothing. That is a rigid-body mode, K is singular, and no static solve will run until you constrain it. Definiteness isn't bookkeeping; it is the algebraic shadow of "this structure is held down."

The mistakes people actually make:

  • Positive entries do not mean positive definite. [[1, 2], [2, 1]] is all positive and has eigenvalues 3 and −1; push along x = (1, −1) and xᵀAx = −2. Meanwhile [[2, −1], [−1, 2]] is full of negative entries and is solidly SPD (eigenvalues 1 and 3). Definiteness lives in the eigenvalues, and you cannot read it off the signs of the matrix.
  • The definition only sees the symmetric part. The nonsymmetric [[1, 10], [0, 1]] has both eigenvalues equal to 1, yet x = (1, −1) gives xᵀAx = −8, because the quadratic form only feels (A + Aᵀ)/2, whose eigenvalues are 6 and −4. For nonsymmetric matrices, "positive eigenvalues" and "positive definite form" are different claims. Symmetrize before you test.
  • Sylvester's criterion has a semidefinite trap. Leading minors all ≥ 0 does not certify semidefiniteness: diag(0, −1) has leading minors 0 and 0 but a −1 eigenvalue sitting in plain sight. The strict criterion (all leading minors > 0 ⇒ definite) is safe; the semidefinite version needs every principal minor, not just the leading ones.
  • The cheapest definiteness test is Cholesky itself. Don't compute eigenvalues to answer a yes/no question — attempt the factorization. It either completes (definite) or hits a nonpositive pivot, and the pivot's index tells you roughly where in the model the energy goes negative. This is precisely what the FEA solver is doing when it throws the error.
  • Theoretical definiteness erodes at roundoff. Covariances propagated through updates, Gram matrices from nearly collinear data, stiffness matrices with element stiffnesses spanning nine decades — all can present a smallest eigenvalue at −1e−14. The fix is structural, not cosmetic: carry L instead of A (square-root filtering), or symmetrize and shift by a small multiple of the identity and say so in the analysis notes.
  • Definite is not the same as well-conditioned. diag(1, 1e−12) is perfectly SPD and numerically hopeless. Definiteness buys you existence, uniqueness, and a stable factorization; it does not buy you accuracy. Check the condition number anyway.

The payoff for respecting all this: SPD is the best-case scenario in numerical linear algebra. Cholesky at half the cost of LU with guaranteed stability, conjugate gradient with a convergence theory, optimization with one global minimum. When a formulation gives you a choice, arrange the math so the matrix is SPD.

History (who derived it and when, told as a short story with inline [n] citations)

The classification came before the applications. James Joseph Sylvester published his law of inertia in the Philosophical Magazine in 1852, proving that however you change coordinates on a quadratic form, the count of positive, negative, and zero squares never changes [1][2]. Positive definiteness is the case where that count is all positive — a property of the physics, not of the coordinate system you wrote it in. The minor-based test that engineers still use for 2×2 and 3×3 checks carries his name.

The factorization came from a surveyor. André-Louis Cholesky, a French artillery officer assigned to the Army Geographic Service, needed to solve the normal equations of large least-squares adjustments for geodetic triangulation — by hand [3][4]. He worked out that the symmetric positive definite matrix of the normal equations could be split into a triangle times its transpose, cutting the arithmetic roughly in half, and wrote the method up in a 1910 manuscript he never published [4]. He was killed in action on 31 August 1918, months before the armistice; a fellow officer, Commandant Benoît, published the method in the Bulletin Géodésique in 1924 under the title "Procédé du Commandant Cholesky" [3][4].

The method's finest hour ran in fifteen-bit words. In 1963, James Potter — an MIT graduate student working part-time on Apollo at the Instrumentation Laboratory — found that the Kalman filter's covariance updates fell apart in the guidance computer's short fixed-point words, losing the positive definiteness the filter's logic depended on. His fix was to never store the covariance at all: propagate its Cholesky factor instead, making the reconstructed matrix positive semidefinite by construction and effectively doubling the usable precision [5][6]. Square-root filtering flew through the Apollo program and its descendants still run in navigation code today [6][7].

Related tools (bullet list of HE calculator slugs that use or neighbor this topic, as /tools/ links; omit section if none fit)

Sources

  1. https://en.wikipedia.org/wiki/Sylvester%27s_law_of_inertia
  2. https://mathworld.wolfram.com/SylvestersInertiaLaw.html
  3. https://mathshistory.st-andrews.ac.uk/Biographies/Cholesky/
  4. https://en.wikipedia.org/wiki/Andr%C3%A9-Louis_Cholesky
  5. https://sites.utexas.edu/near/files/2018/05/UDU_Information.pdf
  6. https://ieeexplore.ieee.org/document/5466132
  7. https://ipnpr.jpl.nasa.gov/progress_report/42-233/42-233A.pdf

Written by HE in our own words from the cited sources — engineering judgment included, your stamp still required. All entries →

★ The Reference Shelf

Reading is free. The shelf is for cardholders.

Your library card is an email address: pin it to your shelf, print the card, take the FE/PE quick-reference pack, read the Huntsville history. The shelf remembers what you reach for.

Already on the list? Enter with your subscribed email →