28.1. THE DETERMINANT 533

Proof: Let (ai1, · · · ,ain) be the ith row of A. Let B j be the matrix obtained from A byleaving every row the same except the ith row which in B j equals

(0, · · · ,0,ai j,0, · · · ,0) .

Then by Corollary 28.1.6,

det(A) =n

∑j=1

det(B j)

Denote by Ai j the (n−1)× (n−1) matrix obtained by deleting the ith row and the jth col-umn of A. Thus cof(A)i j ≡ (−1)i+ j det

(Ai j). At this point, recall that from Proposition

28.1.3, when two rows or two columns in a matrix M, are switched, this results in multi-plying the determinant of the old matrix by −1 to get the determinant of the new matrix.Therefore, by Lemma 28.1.11,

det(B j) = (−1)n− j (−1)n−i det

((Ai j ∗0 ai j

))

= (−1)i+ j det

((Ai j ∗0 ai j

))= ai j cof(A)i j .

Therefore,

det(A) =n

∑j=1

ai j cof(A)i j

which is the formula for expanding det(A) along the ith row. Also,

det(A) = det(AT )= n

∑j=1

aTi j cof

(AT )

i j

=n

∑j=1

a ji cof(A) ji

which is the formula for expanding det(A) along the ith column. ■

28.1.8 Formula For The InverseNote that this gives an easy way to write a formula for the inverse of an n×n matrix.

Theorem 28.1.14 A−1 exists if and only if det(A) ̸= 0. If det(A) ̸= 0, then A−1 =(

a−1i j

)where

a−1i j = det(A)−1 cof(A) ji

for cof(A)i j the i jth cofactor of A.

Proof: By Theorem 28.1.13 and letting (air) = A, if det(A) ̸= 0,

n

∑i=1

air cof(A)ir det(A)−1 = det(A)det(A)−1 = 1.

28.1. THE DETERMINANT 533Proof: Let (aj1,--- ,din) be the i” row of A. Let B j be the matrix obtained from A byleaving every row the same except the i” row which in B 7 equals(0,--- ,0,a;;,0,+-- ,0) :Then by Corollary 28.1.6,ndet(A) = )° det (B;)j=lDenote by AY’ the (n— 1) x (n—1) matrix obtained by deleting the i” row and the j"” col-umn of A. Thus cof(A),; = (—1)'"’ det (AY) . At this point, recall that from Proposition28.1.3, when two rows or two columns in a matrix M, are switched, this results in multi-plying the determinant of the old matrix by —1 to get the determinant of the new matrix.Therefore, by Lemma 28.1.11,det(Bj) = comenmas(( 4) ))0 ai(—1)'*/ det (( “ = )) = ajjcof(A);;.ijndet (A) = y? ajjcof(A);;j=lTherefore,which is the formula for expanding det (A) along the i” row. Also,ndet(A) = det (A") = De aijcof (A")Jny aji cof (A) j;j=lwhich is the formula for expanding det (A) along the i” column. Ml28.1.8 Formula For The InverseNote that this gives an easy way to write a formula for the inverse of an n x n matrix.Theorem 28.1.14 A~! exists if and only if det(A) #0. If det(A) £0, then A~! = (a;;')wherea;;' =det(A)! cof (A) ;;or cof (A),. the ij” cofactor of A.ijProof: By Theorem 28.1.13 and letting (aj) = A, if det(A) 4 0,¥ aircof(A),,det(A)~! = det(A) det(A)~! = 1.i=l