# Section 3.1 $\quad$ Definition of Determinants

## Definition of Permutation

>Let $S=\{1,2,\cdots,n\}$ be the set of integers from $1$ to $n$, arranged in ascending order.
<br /><br /><br /><br />

We can consider a permutation of $S$ to be a one-to-one mapping of $S$ to itself. For example, let $S=\{1,2,3,4\}$
<br /><br /><br /><br />

**Question:** How many permutations does $S=\{1,2,\cdots, n\}$ have?
<br /><br /><br /><br />

### Example 1

Let $S=\{1,2,3\}$. Find all permutations of $S$.
<br /><br /><br /><br /><br /><br /><br />

A permutation $j_1j_2\cdots j_n$ is said to have an **inversion** if
<br /><br />

A permutation is called **even** if
<br /><br />

A permutation is called **odd** if
<br /><br />

### Example 2

- $S_1$ <br /><br />
- $S_2$ <br /><br />
- The permutation $4312$ is in $S_4$ <br /><br />
- $S_3$ <br /><br />

## Definition of Determinant

>Let $A=[a_{ij}]$ be an $n\times n$ matrix. The **determinant** function,<br /><br /><br /><br />

**Remark** <br /><br /><br /><br />

### Example 3

Calculate $\det(A)$ if
\begin{equation*}
A = \left[
  \begin{array}{cc}
    a_{11} & a_{12} \\
    a_{21} & a_{22} \\
  \end{array}
\right]
\end{equation*}


```python
from sympy import *

a11, a12, a21, a22 = symbols('a11 a12 a21 a22');

A = Matrix([[a11, a12], [a21, a22]]);

A.det()
```




    a11*a22 - a12*a21



### Example 4

Calculate $\det(A)$ if
\begin{equation*}
A = \left[
  \begin{array}{ccc}
    a_{11} & a_{12} & a_{13}\\
    a_{21} & a_{22} & a_{23}\\
    a_{31} & a_{32} & a_{33}\\
  \end{array}
\right]
\end{equation*}


```python
from sympy import *

a11, a12, a13, a21, a22, a23, a31, a32, a33 = symbols('a11, a12, a13, a21, a22, a23, a31, a32, a33');

A = Matrix([[a11, a12, a13], [a21, a22, a23], [a31, a32, a33]]);

A.det()
```




    a11*a22*a33 - a11*a23*a32 - a12*a21*a33 + a12*a23*a31 + a13*a21*a32 - a13*a22*a31



Another way to calculate $det(A)$, $\underline{\text{if $A$ is a $3\times 3$ matrix}}$:<br /><br /><br /><br /><br /><br /><br />

### Example 5

Compute the determinant
\begin{equation*}
\det\left(\left[
  \begin{array}{ccc}
    1 & 2 & 3\\
    2 & 1 & 3\\
    3 & 1 & 2
  \end{array}
\right]\right)= \qquad \qquad \qquad \qquad \qquad \qquad \qquad
\end{equation*}


```python
from sympy import *

A = Matrix([[1, 2, 3], [2, 1, 3], [3, 1, 2]]);

A.det()
```




$\displaystyle 6$




```python

```

eaa252d7718784d556e68d27ad45cbbc60638472
ipynb
Jupyter Notebook
Jupyter_Notes/Lecture08_Sec3-1_DefDet.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Jupyter_Notes/Lecture08_Sec3-1_DefDet.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Jupyter_Notes/Lecture08_Sec3-1_DefDet.ipynb
xiuquan0418/MAT341
2fb7ec4e5f0771f10719cb5e4a00a7ab07c49b59
MIT
Qwen/Qwen-72B
1. YES
2. YES