Mathwords logoMathwords

M-Matrix — Definition, Formula & Example

An M-matrix is a square matrix whose off-diagonal entries are all zero or negative and whose inverse exists and contains no negative entries. That nonnegative inverse is what makes these matrices useful.

A real n×nn \times n matrix AA is a nonsingular M-matrix if it can be written as A=sI−BA = sI - B, where BB has all entries ≥0\geq 0 and s>ρ(B)s > \rho(B), the spectral radius of BB. For a Z-matrix AA (one with aij≤0a_{ij} \leq 0 for i≠ji \neq j), each of the following is equivalent to AA being a nonsingular M-matrix: (1) every leading principal minor of AA is positive; (2) every eigenvalue of AA has positive real part; (3) A−1A^{-1} exists and A−1≥0A^{-1} \geq 0 entrywise; (4) some vector x>0x > 0 satisfies Ax>0Ax > 0. If you allow s=ρ(B)s = \rho(B), you get the singular M-matrices.

Key Formula

A=sI−B,B≥0,s>ρ(B)A = sI - B, \qquad B \geq 0, \qquad s > \rho(B)
Where:
  • AA = the n × n matrix being tested
  • II = the n × n identity matrix
  • BB = a matrix whose entries are all nonnegative
  • ss = a positive real number
  • ρ(B)\rho(B) = spectral radius of B, the largest absolute value among its eigenvalues

Worked Example

Problem: Decide whether A=[2−3−14]A = \begin{bmatrix} 2 & -3 \\ -1 & 4 \end{bmatrix} is a nonsingular M-matrix.
Step 1: Check the sign pattern. The off-diagonal entries are −3 and −1, and both are at most 0. So A is a Z-matrix, and you can apply the minor test.
a12=−3≤0,a21=−1≤0a_{12} = -3 \leq 0, \quad a_{21} = -1 \leq 0
Step 2: Compute the leading principal minors. The first is the top-left entry. The second is the full determinant.
Δ1=2>0,Δ2=(2)(4)−(−3)(−1)=8−3=5>0\Delta_1 = 2 > 0, \qquad \Delta_2 = (2)(4) - (-3)(-1) = 8 - 3 = 5 > 0
Step 3: Confirm with the inverse. For a 2 × 2 matrix the inverse is the adjugate divided by the determinant. Every entry comes out nonnegative, as the theory predicts.
A−1=15[4312]≥0A^{-1} = \frac{1}{5}\begin{bmatrix} 4 & 3 \\ 1 & 2 \end{bmatrix} \geq 0
Answer: A is a nonsingular M-matrix. Its eigenvalues, the roots of (2−λ)(4−λ)−3=0(2-\lambda)(4-\lambda) - 3 = 0, are 1 and 5, and both are positive. Row 1 is not diagonally dominant because ∣−3∣>2|-3| > 2. Strict diagonal dominance is sufficient for a Z-matrix with positive diagonal to be a nonsingular M-matrix, but it is not required.

Why It Matters

When you discretize a boundary-value problem such as −u′′=f-u'' = f with finite differences in a numerical analysis course, you get a tridiagonal coefficient matrix with entries 2 and −1. That matrix is an M-matrix. Its nonnegative inverse guarantees that a nonnegative heat source produces a nonnegative temperature solution, and it guarantees that Jacobi and Gauss–Seidel iteration converge. In economics, the Leontief input-output model has a nonnegative production plan for every nonnegative demand exactly when I−AI - A is a nonsingular M-matrix.

Common Mistakes

Mistake: Concluding that a matrix is an M-matrix just because its diagonal is positive and its off-diagonal entries are negative.
Correction: The sign pattern only makes it a Z-matrix. You still need a test such as positive leading principal minors. For example, [1−2−21]\begin{bmatrix} 1 & -2 \\ -2 & 1 \end{bmatrix} has the right signs, but its determinant is 1−4=−3<01 - 4 = -3 < 0, so it is not an M-matrix.

Related Terms

  • Matrix — The general object that M-matrices specialize
  • Adjugate — Gives the inverse used to verify nonnegativity
  • Cofactor — Built from minors like those in the M-matrix test
  • Matrix Inverse — For Z-matrices, a nonnegative inverse is an equivalent test
  • Square Matrix — M-matrices are a special class of square matrices