matrix inversion lemma: Nonlinear Function
Created: February 09, 2014
Modified: March 16, 2022

matrix inversion lemma

This page is from my personal notes, and has not been specifically reviewed for public consumption. It might be incomplete, wrong, outdated, or stupid. Caveat lector.

The Woodbury-Morrison-Sherman matrix inversion lemma,

(A+UCV)1=A1A1U(C1+VA1U)1VA1.(A + UCV)^{-1} = A^{-1} - A^{-1} U (C^{-1} + VA^{-1}U)^{-1} V A^{-1}.

is sometimes useful just for algebraic simplifications. In cases where A:n×nA: n\times n and C:k×kC: k\times k are different sizes, nkn \gg k, it can also be applied to implement an efficient rank-kk update to the inverse of AA, involving only inverses of k×kk\times k matrices. It comes in especially handy when working with multivariate gaussians and Gaussian processes.

We can prove a similar one-sided lemma, by beginning with the tautology

V+VA1UCV=V+VA1UCV,V + VA^{-1} U CV = V + VA^{-1} U CV,

factoring a different expression from each side,

(C1+VA1U)CV=VA1(A+UCV),(C^{-1} + V A^{-1} U) CV = VA^{-1} (A + UCV),

then multiplying by inverses to get the result,

CV(A+UCV)1=(C1+VA1U)1VA1.CV(A + UCV)^{-1} = (C^{-1} + VA^{-1}U)^{-1} V A^{-1}.

A analogue of the matrix inversion lemma, the matrix determinant lemma, holds for determinants:

A+UCV=C1+VA1UAC.|A + UCV| = |C^{-1} + V A^{-1} U | |A| |C|.