# Cofactor Matrix (examples)

- Ex: $2 \times 2$ matrix
- Ex: $3 \times 3$ matrix
- Ex: $4 \times 4$ matrix
Example: $2 \times 2$ matrix
Let $A$ be a $2 \times 2$ matrix defined as
The cofactor matrix of $A$ is

Let $M_{ij}$ be a submatrix given by removing $i$-th row and $j$-th column from $A$,
The determinant of $M_{ij}$ is
Each element of the cofactor matrix is defined as
Specifically, we see that
and in the form of a matrix,
Example:

Let $A$ be a $2 \times 2$ matrix given as
Each element of $\tilde{A}$ is

Calculator
Enter a $2 \times 2$ matrix and press "Execute" button. Then the cofactor matrix is displayed.

Matrix $A$
 1 2 1 2
Cofactor Matrix $\tilde{A}$
 1 2 1 2

Example: $3 \times 3$ matrix
Let $A$ be a $3 \times 3$ matrix given as
. The cofactor matrix of $A$ is

Let $M_{ij}$ be a submatrix given by removing $i$-th row and $j$-th column from $A$,
The determinant of $M_{ij}$ is
Each element of the cofactor matrix $\tilde{A}$ is defined as
Specifically, we see that
and in the form of a matrix,
Example:

Let $A$ be a 3x3 matrix given as
Each element of $\tilde{A}$ is
and in the form of a matrix,
Calculator
Enter a $3 \times 3$ matrix and press "Execute" button. Then the cofactor matrix is displayed.

Matrix $A$
 1 2 3 1 2 3
Cofactor matrix $\tilde{A}$
 1 2 3 1 2 3

Example: $4 \times 4$ matrix
Find the cofactor matrix of

Let $M_{ij}$ be a submatrix given by removing $i$-th row and $j$-th column from $A$,
The determinant of $M_{ij}$ is respectively
(See 3x3 determinant). Each element of the cofactor matrix $\tilde{A}$ is defined as $$\tilde{a}_{ij} = (-1)^{i+j}|M_{ji}|$$ Specifically, we see that
Enter a $4 \times 4$ matrix and press "Execute" button. Then the cofactor matrix is displayed.
Matrix $A$
Cofactor matrix $\tilde{A}$