When the inverse matrix is known at order n, compute it at order n+1

That is to say: add one row-and-column and update the inverse.

Let A be an invertible symmetrix matrix of order n and A -1 its known inverse.
Let b be a vector of length n and c a scalar.
Compute the inverse of the block matrix:
[ A b b T c ]
The inverse has the form
[ X y y T z ]
with X a symmetrix matrix of order n , y a vector of length n and z a scalar, all to be determined so that:
[ A b b T c ][ X y y T z ]=[ I 0 0 T 1 ]
where I is the identity matrix of order n and 0 a vector of length n with all components 0 .
By applying the row-by-column product to the block matrices one obtains the following relations:
A X + b y T = I
A y + b z= 0
b T X +c y T = 0 T
b T y +cz=1
The third relation is redundant because of the symmetry, and will not be used.
Multiply by A -1 the first two relations:
X + A -1 b y T = A -1
y + A -1 b z= 0
Now use the auxiliary variable p (a vector of length n ):
p A -1 b
p is known because A -1 is known. Then:
y =-z p
Substitute in the last equation:
- b T p z+cz=1
and solve for z :
z= 1 c- b T p
Of course this can be computed if c b T p , which is the invertibility condition.
y is then obtained from:
y =-z p
Then solve for X in the first equation: X = A -1 - p y T
Compute an inverse matrix of order n from a known matrix of order n+1.
The problem is still stated as:
[ A b b T c ][ X y y T z ]=[ I 0 0 T 1 ]
However, in this case, X , y and z are known, and A -1 has to be computed. To do that, compute:
p - 1 z y
to obtain: A -1 = X + p y T
Note that if z=0 then A is not invertible and A -1 does not exist.
Here is a JavaScript demonstration (comments in Italian, sorry)
Remark: here one row-and-column is attached or eliminated in the last position only for convenience of presentation.
The inverse matrix can be updated in this way when any row-and-column is eliminated.
When a row-and-column is attached in the last position, row and columns can be sorted afterwards (in both matrices).
Licenza Creative Commons Francesco Uboldi 2014,2015,2016,2017