Define
F_{1} = I, b_{1} =  tr(F_{1}A)/1
F_{2} = F_{1}A + b_{1}Ib_{2} =  tr(F_{2}A)/2
....
F_{n} = F_{n}_{1}A+ b_{n}_{1}Ib_{n}
=  tr(F_{n}A)/n.
Then
(a) the characteristic polynomial of A is

(b) the matrix B(x) given by

satisfies

so that if x is not an eigenvalue of A, then B(x)/p(x) is the inverse of (xI  A). B(x) is known as the adjoint matrix of A.
The proof of this formula is based on the following facts:
(1) The CayleyHamilton Theorem: p(A) is the zero matrix if p is the characteristic polynomial of A.
(2) Newton's formula for sums of zeros of a polynomial: if c_{1}, c_{2},...,c_{n} are the zeros of the polynomial

(*) 
then the sum s_{k} of their kth power

satisfies the recursive relations

(3) Every eigenvalue of A^{k} is of the form c^{k} for some eigenvalue c of A so that the trace tr(A^{k}) of A^{k} is the sum of kth powers of the eigenvalues of A.
We now give the actual proof of the theorem. Assume that the characteristic polynomial of A takes the form (*). After successive substitution from the definition of F_{k}, we obtain

(**) 
for k = 2,3,...,n. Therefore, one shows by induction, together with facts (2) and (3), that


where each s_{k} is the sum of the kth powers of all eigenvalues of A. Hence (a) is proved. Formula (**) also shows

the last equality being the consequence of fact (1). Expanding the lefthand side of (b), we have

from which the desired result follows.
The above construction can be carried out in a spreadsheet program. We now show how this is done in case n = 4:
a. Place the index 1 at cell A6 (k = 1);
b. Enter the identity matrix in B4..E7 (this is F_{1});
c. Set the matrix A in G4..J7 (after the worksheet is completed, this is the only range that needs to be changed to see different output for different A);
c. At cell L4 enter the formula

d. Copy the formula from L4 to L4..O7 (this will give the product F_{1}A);
e. Cell Q7 is to reflect the value of b_{1}, so the formula is

f. At cell A11 enter the formula +A6+1 (k is increased by 1);
g. F_{2} is to be placed in range B9..E12;
h. Copy the formulas from L4..Q7 to L9 (F_{2}A and b_{2} are shown);
i. Copy the formulas from A9..Q22 to A14 (repeat steps fh for k = 3,4,5).