Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eduardoleon/ff4f733590451f9e23c2c8296cba94ad to your computer and use it in GitHub Desktop.
Save eduardoleon/ff4f733590451f9e23c2c8296cba94ad to your computer and use it in GitHub Desktop.
Determinants
pozy% math
Mathematica 13.2.0 Kernel for Linux x86 (64-bit)
Copyright 1988-2022 Wolfram Research, Inc.
In[1]:= A = {{a1,a2},{a3,a4}}
Out[1]= {{a1, a2}, {a3, a4}}
In[2]:= B = {{b1,b2},{b3,b4}}
Out[2]= {{b1, b2}, {b3, b4}}
In[3]:= detA = Det[A]
Out[3]= -(a2 a3) + a1 a4
In[4]:= detB = Det[B]
Out[4]= -(b2 b3) + b1 b4
In[5]:= detAB = Det[A . B]
Out[5]= a2 a3 b2 b3 - a1 a4 b2 b3 - a2 a3 b1 b4 + a1 a4 b1 b4
In[6]:= detA detB // Expand
Out[6]= a2 a3 b2 b3 - a1 a4 b2 b3 - a2 a3 b1 b4 + a1 a4 b1 b4
In[7]:=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment