Basic Examples
Basic Examples
Here is the 1, 2 cofactor of a 3×3 matrix:
In[]:=
0 | 0 | 0 |
1 | 0 | 10 |
10 | 0 | 1 |
Out[]=
99
The positively signed cofactor of the top left-hand corner of an array:
In[]:=
Out[]=
True
Scope
Scope
Define a random 4×4 matrix:
In[]:=
rm=RandomInteger[{0,10},{4,4}];MatrixForm@m
Out[]//MatrixForm=
3 | 8 | 6 | 4 |
1 | 10 | 1 | 1 |
2 | 6 | 3 | 1 |
5 | 2 | 10 | 10 |
Here is its determinant:
In[]:=
Det@rm
Out[]=
1844
Expand the determinant along the first row:
In[]:=
rm[[1,#]][rm,{1,#}]&/@Range@4
Out[]=
{0,-700,2240,304}
Adding up gives the determinant again:
In[]:=
Total@%
Out[]=
1844