374 Note for Chapter 4: How to find the determinant of 2 x 2 or 3 x 3 matrices (by hand or with Mathematica)
374 Note for Chapter 4: How to find the determinant of 2 x 2 or 3 x 3 matrices (by hand or with Mathematica)
2 x 2 matrix A = a b c d
.
2 x 2 matrix A = .
a | b |
c | d |
A={{a,b},{c,d}}
Out[]=
{{a,b},{c,d}}
Here' s how to make A look more like a matrix we are used to seeing (not required to compute the determinant of matrix A):
MatrixForm[A]
Out[]//MatrixForm=
a | b |
c | d |
Find the determinant of A. Notation det(A) or |A|.
Det[A]
Out[]=
-bc+ad
Note that .
det(A)=|A|=ad-bc
3 x 3 matrix B = a b c d e f g h i
3 x 3 matrix B =
a | b | c |
d | e | f |
g | h | i |
B={{a,b,c},{d,e,f},{g,h,i}}
Out[]=
{{a,b,c},{d,e,f},{g,h,i}}
Here's how to make B look more like a matrix we are used to seeing (not required to compute the determinant of matrix B):
MatrixForm[B]
Out[]//MatrixForm=
a | b | c |
d | e | f |
g | h | i |
Det[B]
Out[]=
-ceg+bfg+cdh-afh-bdi+aei
Note that
det(A)=|A|=aei+bfg+cdh-gec-hfa-idb.
Determinants of upper or lower triangular matrices of the form a b 0 d
, a 0 c d
, a b c 0 e f 0 0 i
, or a 0 0 d e 0 g h i
are the product of diagonal elements!
Determinants of upper or lower triangular matrices of the form , ,
, or
are the product of diagonal elements!
a | b |
0 | d |
a | 0 |
c | d |
a | b | c |
0 | e | f |
0 | 0 | i |
a | 0 | 0 |
d | e | 0 |
g | h | i |
Det[{{a,b},{0,d}}]
Out[]=
ad
Det[{{a,0},{c,d}}]
Out[]=
ad
Det[{{a,b,c},{0,e,f},{0,0,i}}]
Out[]=
aei
Det[{{a,0,0},{d,e,0},{g,h,i}}]
Out[]=
aei