Sherman–Morrison formula

From testwiki
Jump to navigation Jump to search

Template:Use American English Template:Short description In linear algebra, the Sherman–Morrison formula, named after Jack Sherman and Winifred J. Morrison, computes the inverse of a "rank-1 update" to a matrix whose inverse has previously been computed.[1][2][3] That is, given an invertible matrix A and the outer product uv𝖳 of vectors u and v, the formula cheaply computes an updated matrix inverse (A+uv𝖳))1.

The Sherman–Morrison formula is a special case of the Woodbury formula. Though named after Sherman and Morrison, it appeared already in earlier publications.[4]

Statement

Suppose An×n is an invertible square matrix and u,vn are column vectors. Then A+uv𝖳 is invertible if and only if 1+v𝖳A1u0. In this case,

(A+uv𝖳)1=A1A1uv𝖳A11+v𝖳A1u.

Here, uv𝖳 is the outer product of two vectors u and v. The general form shown here is the one published by Bartlett.[5]

Proof

() To prove that the backward direction 1+v𝖳A1u0A+uv𝖳 is invertible with inverse given as above) is true, we verify the properties of the inverse. A matrix Y (in this case the right-hand side of the Sherman–Morrison formula) is the inverse of a matrix X (in this case A+uv𝖳) if and only if XY=YX=I.

We first verify that the right hand side (Y) satisfies XY=I.

XY=(A+uv𝖳)(A1A1uv𝖳A11+v𝖳A1u)=AA1+uv𝖳A1AA1uv𝖳A1+uv𝖳A1uv𝖳A11+v𝖳A1u=I+uv𝖳A1uv𝖳A1+uv𝖳A1uv𝖳A11+v𝖳A1u=I+uv𝖳A1u(1+v𝖳A1u)v𝖳A11+v𝖳A1u=I+uv𝖳A1uv𝖳A1=I

To end the proof of this direction, we need to show that YX=I in a similar way as above:

YX=(A1A1uv𝖳A11+v𝖳A1u)(A+uv𝖳)=I.

(In fact, the last step can be avoided since for square matrices X and Y, XY=I is equivalent to YX=I.)

() Reciprocally, if 1+v𝖳A1u=0, then via the matrix determinant lemma, det(A+uv𝖳)=(1+v𝖳A1u)det(A)=0, so (A+uv𝖳) is not invertible.

Application

If the inverse of A is already known, the formula provides a numerically cheap way to compute the inverse of A corrected by the matrix uv𝖳 (depending on the point of view, the correction may be seen as a perturbation or as a rank-1 update). The computation is relatively cheap because the inverse of A+uv𝖳 does not have to be computed from scratch (which in general is expensive), but can be computed by correcting (or perturbing) A1.

Using unit columns (columns from the identity matrix) for u or v, individual columns or rows of A may be manipulated and a correspondingly updated inverse computed relatively cheaply in this way.[6] In the general case, where A1 is an n-by-n matrix and u and v are arbitrary vectors of dimension n, the whole matrix is updated[5] and the computation takes 3n2 scalar multiplications.[7] If u is a unit column, the computation takes only 2n2 scalar multiplications. The same goes if v is a unit column. If both u and v are unit columns, the computation takes only n2 scalar multiplications.

This formula also has application in theoretical physics. Namely, in quantum field theory, one uses this formula to calculate the propagator of a spin-1 field.[8]Template:Circular reference The inverse propagator (as it appears in the Lagrangian) has the form A+uv𝖳. One uses the Sherman–Morrison formula to calculate the inverse (satisfying certain time-ordering boundary conditions) of the inverse propagator—or simply the (Feynman) propagator—which is needed to perform any perturbative calculation[9] involving the spin-1 field.

One of the issues with the formula is that little is known about its numerical stability. There are no published results concerning its error bounds. Anecdotal evidence[10] suggests that the Woodbury matrix identity (a generalization of the Sherman–Morrison formula) may diverge even for seemingly benign examples (when both the original and modified matrices are well-conditioned).

Alternative verification

Following is an alternate verification of the Sherman–Morrison formula using the easily verifiable identity

(I+wv𝖳)1=Iwv𝖳1+v𝖳w.

Let

u=Aw,andA+uv𝖳=A(I+wv𝖳),

then

(A+uv𝖳)1=(I+wv𝖳)1A1=(Iwv𝖳1+v𝖳w)A1.

Substituting w=A1u gives

(A+uv𝖳)1=(IA1uv𝖳1+v𝖳A1u)A1=A1A1uv𝖳A11+v𝖳A1u

Generalization (Woodbury matrix identity)

Given a square invertible n×n matrix A, an n×k matrix U, and a k×n matrix V, let B be an n×n matrix such that B=A+UV. Then, assuming (Ik+VA1U) is invertible, we have

B1=A1A1U(Ik+VA1U)1VA1.

See also

References

Template:Reflist