Skip to content
Fix

"The covariance matrix is not positive definite"

This message means your covariance or correlation matrix has a zero or negative eigenvalue, so it is not a valid matrix to model. The most common causes are too small a sample, highly collinear or redundant items, reverse-coded items that were never recoded, or a correlation that came out greater than 1.

covariance matrix is not positive definite

What the error means

A valid covariance matrix is positive definite: every set of items has a positive variance. When software reports it is not positive definite (NPD), the matrix has at least one eigenvalue that is zero or negative. That can happen with the raw data matrix or with the model-implied matrix during estimation. Either way the analysis cannot proceed safely, and any estimates printed afterwards are suspect. In practice the message most often appears while estimating a confirmatory factor analysis or a covariance-based SEM, because those models rebuild the implied covariance matrix at every iteration.

Common causes

  • Sample size smaller than the number of variables, or barely larger — the matrix becomes singular.
  • Multicollinearity: two or more items are almost perfectly correlated, or one item is a linear combination of others.
  • Redundant items — the same question asked twice, or a total score entered alongside its components.
  • Reverse-worded items not recoded, which pushes some correlations the wrong way.
  • A correlation greater than 1 (or below -1), often from pairwise deletion of missing data or a data-entry error.
  • Model misspecification producing a non-positive-definite model-implied matrix during estimation.

How to fix it

  1. Print and read the correlation matrix. Look for any value at or above 1 (or below -1) and for pairs near 1 — those are the trouble spots.
  2. Recode reverse-worded items so all items point the same way, then recompute the matrix.
  3. Drop redundant or collinear items: keep one of a near-duplicate pair, and never enter a composite together with its parts.
  4. Use listwise deletion (or a principled missing-data method) instead of pairwise, since pairwise correlations can produce an inconsistent matrix.
  5. Check that N is comfortably larger than the number of variables; collect more data if not.
  6. If the data matrix is fine but the warning appears during model fitting, the model is likely misspecified or unidentified — revisit identification and any Heywood cases.

How to avoid it next time

Screen items before you model: recode reverse items early, drop near-duplicates, and aim for a sample comfortably larger than the item count. Explonia builds the correlation matrix and reliability output as you go and flags items that overlap heavily or behave oddly, so you can catch a near-singular matrix before it breaks the model. See the reliability and diagnostics methods for what to check.

Reference table

Quick triage for a non-positive-definite matrix
Symptom in the matrixLikely causeFirst fix
A correlation ≥ 1 or ≤ -1Pairwise deletion or data errorUse listwise deletion; check data entry
Two items correlate near 1Redundant / duplicate itemsDrop one of the pair
Some correlations have the wrong signReverse items not recodedRecode reverse-worded items
Matrix singular, N smallN close to number of variablesCollect more data or reduce items

Frequently asked questions

Can I just "smooth" the matrix to make it positive definite?

Smoothing methods exist, but they mask the underlying problem rather than solve it. Find and fix the real cause first — a correlation above 1, a redundant item, an unrecoded reverse item or too small a sample — because a smoothed matrix can still give misleading estimates.

Why is the model-implied matrix non-positive-definite even though my data are fine?

That points to the model, not the data: an unidentified parameter, a Heywood case (negative residual variance) or a structural misspecification can produce a non-positive-definite model-implied matrix during estimation. Check identification and look for out-of-bounds variance estimates.

Is a non-positive-definite matrix the same as a Heywood case?

They are related but not identical. A Heywood case is a specific out-of-bounds estimate (such as a negative error variance) that often makes the model-implied matrix non-positive-definite. The NPD message can also come from the raw data matrix before any model is fit.

How to cite this page

If this page helped your research, you can cite it (APA 7):

Szymkowiak, A. (2026). Covariance Matrix Is Not Positive Definite (Fix). Explonia. https://explonia.com/fix/non-positive-definite-matrix/

Last updated: June 2026

Run your whole study in one place

Build it, collect it, and get publication-grade analysis with a draft APA paragraph you can edit. Free to start. No credit card.

Start free