Laplace expansion

From testwiki
Revision as of 10:57, 12 November 2024 by imported>Citation bot (Add: jstor, doi, authors 1-1. Removed parameters. Some additions/deletions were parameter name changes. | Use this bot. Report bugs. | Suggested by Dominic3203 | Category:Determinants | #UCB_Category 33/47)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:About Template:Short description

In linear algebra, the Laplace expansion, named after Pierre-Simon Laplace, also called cofactor expansion, is an expression of the determinant of an Template:Math-matrix Template:Mvar as a weighted sum of minors, which are the determinants of some Template:Math-submatrices of Template:Mvar. Specifically, for every Template:Mvar, the Laplace expansion along the Template:Mvarth row is the equality det(B)=j=1n(1)i+jbi,jmi,j, where bi,j is the entry of the Template:Mvarth row and Template:Mvarth column of Template:Mvar, and mi,j is the determinant of the submatrix obtained by removing the Template:Mvarth row and the Template:Mvarth column of Template:Mvar. Similarly, the Laplace expansion along the Template:Mvarth column is the equality det(B)=i=1n(1)i+jbi,jmi,j. (Each identity implies the other, since the determinants of a matrix and its transpose are the same.)

The coefficient (1)i+jmi,j of bi,j in the above sum is called the cofactor of bi,j in Template:Mvar.

The Laplace expansion is often useful in proofs, as in, for example, allowing recursion on the size of matrices. It is also of didactic interest for its simplicity and as one of several ways to view and compute the determinant. For large matrices, it quickly becomes inefficient to compute when compared to Gaussian elimination.

Examples

Consider the matrix

B=[123456789].

The determinant of this matrix can be computed by using the Laplace expansion along any one of its rows or columns. For instance, an expansion along the first row yields:

|B|=1|5689|2|4679|+3|4578|=1(3)2(6)+3(3)=0.

Laplace expansion along the second column yields the same result:

|B|=2|4679|+5|1379|8|1346|=2(6)+5(12)8(6)=0.

It is easy to verify that the result is correct: the matrix is singular because the sum of its first and third column is twice the second column, and hence its determinant is zero.

Proof

Suppose B is an n × n matrix and i,j{1,2,,n}. For clarity we also label the entries of B that compose its i,j minor matrix Mij as

(ast) for 1s,tn1.

Consider the terms in the expansion of |B| that have bij as a factor. Each has the form

sgnτb1,τ(1)bi,jbn,τ(n)=sgnτbija1,σ(1)an1,σ(n1)

for some permutation Template:Math with τ(i)=j, and a unique and evidently related permutation σSn1 which selects the same minor entries as Template:Mvar. Similarly each choice of Template:Mvar determines a corresponding Template:Mvar i.e. the correspondence στ is a bijection between Sn1 and {τSn:τ(i)=j}. Using Cauchy's two-line notation, the explicit relation between τ and σ can be written as

σ=(12in1()j(τ(1))()j(τ(2))()j(τ(i+1))()j(τ(n)))

where ()j is a temporary shorthand notation for a cycle (n,n1,,j+1,j). This operation decrements all indices larger than j so that every index fits in the set {1,2,...,n-1}

The permutation Template:Mvar can be derived from Template:Mvar as follows. Define σSn by σ(k)=σ(k) for 1kn1 and σ(n)=n. Then σ is expressed as

σ=(12in1n()j(τ(1))()j(τ(2))()j(τ(i+1))()j(τ(n))n)

Now, the operation which apply ()i first and then apply σ is (Notice applying A before B is equivalent to applying inverse of A to the upper row of B in two-line notation)

σ()i=(12i+1ni()j(τ(1))()j(τ(2))()j(τ(i+1))()j(τ(n))n)

where ()i is temporary shorthand notation for (n,n1,,i+1,i).

the operation which applies τ first and then applies ()j is

()jτ=(12in1n()j(τ(1))()j(τ(2))n()j(τ(n1))()j(τ(n)))

above two are equal thus,

()jτ=σ()i
τ=()jσ()i

where ()j is the inverse of ()j which is (j,j+1,,n).

Thus

τ=(j,j+1,,n)σ(n,n1,,i)

Since the two cycles can be written respectively as ni and nj transpositions,

sgnτ=(1)2n(i+j)sgnσ=(1)i+jsgnσ.

And since the map στ is bijective,

i=1nτSn:τ(i)=jsgnτb1,τ(1)bn,τ(n)=i=1nσSn1(1)i+jsgnσbija1,σ(1)an1,σ(n1)=i=1nbij(1)i+jσSn1sgnσa1,σ(1)an1,σ(n1)=i=1nbij(1)i+jMij

from which the result follows. Similarly, the result holds if the index of the outer summation was replaced with j.[1]

Laplace expansion of a determinant by complementary minors

Laplace's cofactor expansion can be generalised as follows.

Example

Consider the matrix

A=[12345678910111213141516].

The determinant of this matrix can be computed by using the Laplace's cofactor expansion along the first two rows as follows. Firstly note that there are 6 sets of two distinct numbers in Template:Math namely let S={{1,2},{1,3},{1,4},{2,3},{2,4},{3,4}} be the aforementioned set.

By defining the complementary cofactors to be

b{j,k}=|a1ja1ka2ja2k|,
c{p,q}=|a3pa3qa4pa4q|,

and the sign of their permutation to be

ε{j,k},{p,q}=sgn[1234jkpq], where pj,qk.

The determinant of A can be written out as

|A|=HSεH,HbHcH,

where H is the complementary set to H.

In our explicit example this gives us

|A|=b{1,2}c{3,4}b{1,3}c{2,4}+b{1,4}c{2,3}+b{2,3}c{1,4}b{2,4}c{1,3}+b{3,4}c{1,2}=|1256||11121516||1357||10121416|+|1458||10111415|+|2367||9121316||2468||9111315|+|3478||9101314|=4(4)(8)(8)+(12)(4)+(4)(12)(8)(8)+(4)(4)=1664+48+4864+16=0.

As above, it is easy to verify that the result is correct: the matrix is singular because the sum of its first and third column is twice the second column, and hence its determinant is zero.

General statement

Let B=[bij] be an Template:Math matrix and S the set of Template:Math-element subsets of Template:Math, H an element in it. Then the determinant of B can be expanded along the Template:Math rows identified by H as follows:

|B|=LSεH,LbH,LcH,L

where εH,L is the sign of the permutation determined by H and L, equal to (1)(hHh)+(L), bH,L the square minor of B obtained by deleting from B rows and columns with indices in H and L respectively, and cH,L (called the complement of bH,L) defined to be bH,L , H and L being the complement of H and L respectively.

This coincides with the theorem above when k=1. The same thing holds for any fixed Template:Math columns.

Computational expense

The Laplace expansion is computationally inefficient for high-dimension matrices, with a time complexity in big O notation of Template:Math. Alternatively, using a decomposition into triangular matrices as in the LU decomposition can yield determinants with a time complexity of Template:Math.[2] The following Python code implements the Laplace expansion:

def determinant(M):
    # Base case of recursive function: 1x1 matrix
    if len(M) == 1: 
        return M[0][0]

    total = 0
    for column, element in enumerate(M[0]):
        # Exclude first row and current column.
        K = [x[:column] + x[column + 1 :] for x in M[1:]]
        s = 1 if column % 2 == 0 else -1 
        total += s * element * determinant(K)
    return total

See also

Template:Portal

References

  1. Template:Cite journal
  2. Stoer Bulirsch: Introduction to Numerical Mathematics

de:Determinante#Laplacescher Entwicklungssatz