### Computation of Determinant

##### 3. Combination of two methods

The row/column operations can simplify determinants. The cofactor expansions can reduce size. By combining the two methods, we can efficiently compute determinants.

Example In an earlier example, we computed a 4 by 4 determinant by cofactor expansion only. The computation involes two 3 by 3 determinants. Now we mix two methods and get a more efficient computation.

det[ 2 1 4 2 ] = det[ 0 1 3 2 ]
 = -2det[ 1 3 2 ] = -2det[ -5 3 -1 ] 2 1 2 0 1 1 2 1 1 0 1 0

0 2 1 2 0 2 1 2 = 2det[ -5 -1 ] = -10.
0 2 1 1 0 2 1 1 0 1
2 0 1 0 2 0 1 0

In the computation, the red equalities = mean row/columns operations. The first red equality means (-1)[row 4] + [row 1], and the second one means (-2)[col 2] + [col 1] and (-1)[col 2] + [col 3]. Moreover, the green equalities = mean cofactor expansions, along the darkened row or column.

Example By [col 3] + [col 2] and (-1)[row 2] + [row 3], we have

 det[ 1 - λ 3 -3 ] = det[ 1 - λ 0 -3 ] = det[ 1 - λ 0 -3 ]. -3 7 - λ -3 -3 4 - λ -3 -3 4 - λ -3 -6 6 -2 - λ -6 4 - λ -2 - λ -3 0 1 - λ

Expanding along [col 2], the determinant is

 (4 - λ)det[ 1 - λ -3 ] = (4 - λ)[(1 - λ)2 - (-3)2] = (4 - λ)(1 - λ - (-3))(1 - λ + (-3)). -3 1 - λ

Thus we conclude

 det[ 1 - λ 3 -3 ] = (4 - λ)2(- 2- λ). -3 7 - λ -3 -6 6 -2 - λ

Example The 4 by 4 Vandermonde matrix is

 V4(a, b, c, d) = [ 1 a a2 a3 ]. 1 b b2 b3 1 c c2 c3 1 d d2 d3

To find its determinant, we apply (-a)[col 3] + [col 4], (-a)[col 2] + [col 3], (-a)[col 1] + [col 2], and then expand along the first row

detV4(a, b, c, d) = det[ 1 0 0 0 ] =
 det[ b - a b(b - a) b2(b - a) ]. c - a c(c - a) c2(c - a) d - a d(d - a) d2(d - a)
1 b - a b(b - a) b2(b - a)
1 c - a c(c - a) c2(c - a)
1 d - a d(d - a) d2(d - a)

Note that in the 3 by 3 matrix, [row 1] is (b - a) multiplied to (1, b, b2), and similarly for [row 2] and [row 3]. By the third operation, we get

 detV4(a, b, c, d) = (b - a)(c - a)(d - a)det[ 1 b b2 ] = (b - a)(c - a)(d - a)detV3(b, c, d). 1 c c2 1 d d2

This suggests a pattern for reducing the determinant of a Vandermonde matrix to another Vandermonde matrix of smaller size. Following the pattern, we get

detV4(a, b, c, d)
= (b - a)(c - a)(d - a)detV3(b, c, d)
= (b - a)(c - a)(d - a)(c - b)(d - b)detV2(c, d)
= (b - a)(c - a)(d - a)(c - b)(d - b)(d - c)detV1(d)
= (b - a)(c - a)(d - a)(c - b)(d - b)(d - c).

In general, the n by n Vandermonde matrix is

 Vn(a1, a2, a3, ..., an) = [ 1 a1 a12 . . a1n-1 ]. 1 a2 a22 . . a2n-1 1 a3 a32 . . a3n-1 : : : : 1 an an2 . . ann-1

From the relation

detVn(a1, a2, a3, ..., an) = (an - a1)...(a3 - a1)(a2 - a1)detVn-1(a2, a3, ..., an),

we get

detVn(a1, a2, a3, ..., an) = ∏1≤i<jn(aj - ai).