Calcolo del determinante di una matrice

Calcolo del determinante di una matrice
Calcolo del determinante di una matrice

Versione italiana

Calcolo del determinante di una matrice

Il determinante di una matrice è un valore scalare che fornisce informazioni importanti sulle proprietà della matrice, come la sua invertibilità. Ecco come calcolare il determinante per matrici di diverse dimensioni:

1. Matrice 2x2

Per una matrice AAA di dimensione 2x2:

A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}
A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}

Il determinante è calcolato come:

\text{det}(A) = ad - bc
det(A)=adbc\text{det}(A) = ad - bc

2. Matrice 3x3

Per una matrice BBB di dimensione 3x3:

B = \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix}
B=(abcdefghi)B = \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix}

Il determinante può essere calcolato usando la regola di Sarrus o l'espansione per cofattori. Usando l'espansione per cofattori, otteniamo:

\text{det}(B) = a \cdot \text{det}\begin{pmatrix} e & f \\ h & i \end{pmatrix} - b \cdot \text{det}\begin{pmatrix} d & f \\ g & i \end{pmatrix} + c \cdot \text{det}\begin{pmatrix} d & e \\ g & h \end{pmatrix}
det(B)=adet(efhi)bdet(dfgi)+cdet(degh)\text{det}(B) = a \cdot \text{det}\begin{pmatrix} e & f \\ h & i \end{pmatrix} - b \cdot \text{det}\begin{pmatrix} d & f \\ g & i \end{pmatrix} + c \cdot \text{det}\begin{pmatrix} d & e \\ g & h \end{pmatrix}

Calcolando i determinanti delle sottomatrici 2x2, otteniamo:

\text{det}(B) = a(ei - fh) - b(di - fg) + c(dh - eg)
det(B)=a(eifh)b(difg)+c(dheg)\text{det}(B) = a(ei - fh) - b(di - fg) + c(dh - eg)

3. Matrice di dimensione n x n

Per matrici di dimensione superiore a 3x3, puoi utilizzare l'espansione per cofattori lungo una riga o una colonna. La formula generale è:

\text{det}(A) = \sum_{j=1}^{n} (-1)^{i+j} a_{ij} \cdot \text{det}(M_{ij})
det(A)=j=1n(1)i+jaijdet(Mij)\text{det}(A) = \sum_{j=1}^{n} (-1)^{i+j} a_{ij} \cdot \text{det}(M_{ij})

dove M_{ij}MijM_{ij} è la matrice ottenuta eliminando la riga iii e la colonna jjj dalla matrice AAA.

Esempio di calcolo del determinante di una matrice 3x3

Consideriamo la matrice:

C = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix}
C=(123014560)C = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix}

Calcoliamo il determinante usando l'espansione lungo la prima riga:

\text{det}(C) = 1 \cdot \text{det}\begin{pmatrix} 1 & 4 \\ 6 & 0 \end{pmatrix} - 2 \cdot \text{det}\begin{pmatrix} 0 & 4 \\ 5 & 0 \end{pmatrix} + 3 \cdot \text{det}\begin{pmatrix} 0 & 1 \\ 5 & 6 \end{pmatrix}
det(C)=1det(1460)2det(0450)+3det(0156)\text{det}(C) = 1 \cdot \text{det}\begin{pmatrix} 1 & 4 \\ 6 & 0 \end{pmatrix} - 2 \cdot \text{det}\begin{pmatrix} 0 & 4 \\ 5 & 0 \end{pmatrix} + 3 \cdot \text{det}\begin{pmatrix} 0 & 1 \\ 5 & 6 \end{pmatrix}

Calcoliamo i determinanti delle sottomatrici:

\text{det}\begin{pmatrix} 1 & 4 \\ 6 & 0 \end{pmatrix} = (1 \cdot 0) - (4 \cdot 6) = -24
det(1460)=(10)(46)=24\text{det}\begin{pmatrix} 1 & 4 \\ 6 & 0 \end{pmatrix} = (1 \cdot 0) - (4 \cdot 6) = -24
\text{det}\begin{pmatrix} 0 & 4 \\ 5 & 0 \end{pmatrix} = (0 \cdot 0) - (4 \cdot 5) = -20
det(0450)=(00)(45)=20\text{det}\begin{pmatrix} 0 & 4 \\ 5 & 0 \end{pmatrix} = (0 \cdot 0) - (4 \cdot 5) = -20
\text{det}\begin{pmatrix} 0 & 1 \\ 5 & 6 \end{pmatrix} = (0 \cdot 6) - (1 \cdot 5) = -5
det(0156)=(06)(15)=5\text{det}\begin{pmatrix} 0 & 1 \\ 5 & 6 \end{pmatrix} = (0 \cdot 6) - (1 \cdot 5) = -5

Ora sostituiamo:

\text{det}(C) = 1 \cdot (-24) - 2 \cdot (-20) + 3 \cdot (-5) = -24 + 40 - 15 = 1
det(C)=1(24)2(20)+3(5)=24+4015=1\text{det}(C) = 1 \cdot (-24) - 2 \cdot (-20) + 3 \cdot (-5) = -24 + 40 - 15 = 1

Quindi, il determinante della matrice CCC è 1.

Calcolo del Determinante di una Matrice 3x3 con il Metodo di Sarrus

Consideriamo la seguente matrice:

A = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}
A=(a11a12a13a21a22a23a31a32a33)A = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}

Passaggi per il Calcolo

  1. Scrivi la matrice e ripeti le prime due colonne a destra:
\begin{pmatrix} a_{11} & a_{12} & a_{13} & | & a_{11} & a_{12} \\ a_{21} & a_{22} & a_{23} & | & a_{21} & a_{22} \\ a_{31} & a_{32} & a_{33} & | & a_{31} & a_{32} \end{pmatrix}
(a11a12a13a11a12a21a22a23a21a22a31a32a33a31a32)\begin{pmatrix} a_{11} & a_{12} & a_{13} & | & a_{11} & a_{12} \\ a_{21} & a_{22} & a_{23} & | & a_{21} & a_{22} \\ a_{31} & a_{32} & a_{33} & | & a_{31} & a_{32} \end{pmatrix}
  1. Calcola la somma dei prodotti delle diagonali che vanno dall'alto a sinistra al basso a destra:
D_1 = a_{11} a_{22} a_{33} + a_{12} a_{23} a_{31} + a_{13} a_{21} a_{32}
D1=a11a22a33+a12a23a31+a13a21a32D_1 = a_{11} a_{22} a_{33} + a_{12} a_{23} a_{31} + a_{13} a_{21} a_{32}
  1. Calcola la somma dei prodotti delle diagonali che vanno dall'alto a destra al basso a sinistra:
D_2 = a_{13} a_{22} a_{31} + a_{11} a_{23} a_{32} + a_{12} a_{21} a_{33}
D2=a13a22a31+a11a23a32+a12a21a33D_2 = a_{13} a_{22} a_{31} + a_{11} a_{23} a_{32} + a_{12} a_{21} a_{33}
  1. Il determinante è dato dalla differenza tra queste due somme:
\text{det}(A) = D_1 - D_2
det(A)=D1D2\text{det}(A) = D_1 - D_2

Esempio

Consideriamo la matrice:

A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}
A=(123456789)A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}

Calcoliamo il determinante usando il metodo di Sarrus:

  1. Somma delle diagonali dall'alto a sinistra al basso a destra:
D_1 = 1 \cdot 5 \cdot 9 + 2 \cdot 6 \cdot 7 + 3 \cdot 4 \cdot 8 = 45 + 84 + 96 = 225
D1=159+267+348=45+84+96=225D_1 = 1 \cdot 5 \cdot 9 + 2 \cdot 6 \cdot 7 + 3 \cdot 4 \cdot 8 = 45 + 84 + 96 = 225
  1. Somma delle diagonali dall'alto a destra al basso a sinistra:
D_2 = 3 \cdot 5 \cdot 7 + 1 \cdot 6 \cdot 8 + 2 \cdot 4 \cdot 9 = 105 + 48 + 72 = 225
D2=357+168+249=105+48+72=225D_2 = 3 \cdot 5 \cdot 7 + 1 \cdot 6 \cdot 8 + 2 \cdot 4 \cdot 9 = 105 + 48 + 72 = 225
  1. Calcoliamo il determinante:
\text{det}(A) = D_1 - D_2 = 225 - 225 = 0
det(A)=D1D2=225225=0\text{det}(A) = D_1 - D_2 = 225 - 225 = 0

Quindi, il determinante della matrice AAA è 000.

English version

Calculating the determinant of a matrix.

The determinant of a matrix is a scalar value that provides important information about properties of the matrix, such as its invertibility. Here is how to calculate the determinant for matrices of different sizes:

1. 2x2 matrix

For a matrix AAA of dimension 2x2:

A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}.

The determinant is calculated as:

\text{det}(A) = ad - bc
det(A)=adbc\text{det}(A) = ad - bc

2. 3x3 matrix

For a matrix BBB of dimension 3x3:

B = \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix}B=(abcdefghi)B = \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix}.

The determinant can be calculated using Sarrus' rule or the expansion by cofactors. Using the expansion by cofactors, we get:

\text{det}(B) = a \cdot \text{det}\begin{pmatrix} e & f \\ h & i \end{pmatrix} - b  \cdot \text{det}\begin{pmatrix} d & f \\ g & i \end{pmatrix} + c  \cdot \text{det}\begin{pmatrix} d & e \\ g & h \end{pmatrix}
det(B)=adet(efhi)bdet(dfgi)+cdet(degh)\text{det}(B) = a \cdot \text{det}\begin{pmatrix} e & f \\ h & i \end{pmatrix} - b \cdot \text{det}\begin{pmatrix} d & f \\ g & i \end{pmatrix} + c \cdot \text{det}\begin{pmatrix} d & e \\ g & h \end{pmatrix}

Calculating the determinants of the 2x2 submatrices, we obtain:

\text{det}(B) = a(ei - fh) - b(di - fg) + c(dh - eg)
det(B)=a(eifh)b(difg)+c(dheg)\text{det}(B) = a(ei - fh) - b(di - fg) + c(dh - eg)

3. Matrix of dimension n x n

For matrices of size greater than 3x3, you can use expansion by cofactors along a row or column. The general formula is:

\text{det}(A) = \sum_{j=1}^{n} (-1)^{i+j} a_{ij} \cdot \text{det}(M_{ij})
det(A)=j=1n(1)i+jaijdet(Mij)\text{det}(A) = \sum_{j=1}^{n} (-1)^{i+j} a_{ij} \cdot \text{det}(M_{ij})

where M_{ij}MijM_{ij} is the matrix obtained by removing row iii and column jjj from matrix AAA.

Example of calculating the determinant of a 3x3 matrix.

Consider the matrix:

C = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix}
C=(123014560)C = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix}

We calculate the determinant using the expansion along the first line:

\text{det}(C) = 1 \cdot \text{det}\begin{pmatrix} 1 & 4 \\ 6 & 0 \end{pmatrix} - 2 \cdot \text{det}\begin{pmatrix} 0 & 4 \\ 5 & 0 \end{pmatrix} + 3 \cdot \text{det}\begin{pmatrix} 0 & 1 \\ 5 & 6 \end{pmatrix}
det(C)=1det(1460)2det(0450)+3det(0156)\text{det}(C) = 1 \cdot \text{det}\begin{pmatrix} 1 & 4 \\ 6 & 0 \end{pmatrix} - 2 \cdot \text{det}\begin{pmatrix} 0 & 4 \\ 5 & 0 \end{pmatrix} + 3 \cdot \text{det}\begin{pmatrix} 0 & 1 \\ 5 & 6 \end{pmatrix}

We calculate the determinants of the submatrices:

\text{det}\begin{pmatrix} 1 & 4 \\ 6 & 0 \end{pmatrix} = (1 \cdot 0) - (4 \cdot 6) = -24
det(1460)=(10)(46)=24\text{det}\begin{pmatrix} 1 & 4 \\ 6 & 0 \end{pmatrix} = (1 \cdot 0) - (4 \cdot 6) = -24
\text{det}\begin{pmatrix} 0 & 4 \\ 5 & 0 \end{pmatrix} = (0 \cdot 0) - (4 \cdot 5) = -20
det(0450)=(00)(45)=20\text{det}\begin{pmatrix} 0 & 4 \\ 5 & 0 \end{pmatrix} = (0 \cdot 0) - (4 \cdot 5) = -20
\text{det}\begin{pmatrix} 0 & 1 \\ 5 & 6 \end{pmatrix} = (0 \cdot 6) - (1 \cdot 5) = -5
det(0156)=(06)(15)=5\text{det}\begin{pmatrix} 0 & 1 \\ 5 & 6 \end{pmatrix} = (0 \cdot 6) - (1 \cdot 5) = -5

Now we substitute:

\text{det}(C) = 1 \cdot (-24) - 2 \cdot (-20) + 3 \cdot (-5) = -24 + 40 - 15 = 1
det(C)=1(24)2(20)+3(5)=24+4015=1\text{det}(C) = 1 \cdot (-24) - 2 \cdot (-20) + 3 \cdot (-5) = -24 + 40 - 15 = 1

Thus, the determinant of the matrix CCC is 1.

Calculating the Determinant of a 3x3 Matrix with the Sarrus Method

Consider the following matrix:

A = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}
A=(a11a12a13a21a22a23a31a32a33)A = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}

Calculating Steps

  1. Write the matrix and repeat the first two columns on the right:
\begin{pmatrix} a_{11} & a_{12} & a_{13} & | & a_{11} & a_{12} \\ a_{21} & a_{22} & a_{23} & | & a_{21} & a_{22} \\ a_{31} & a_{32} & a_{33} & | & a_{31} & a_{32} \end{pmatrix}
(a11a12a13a11a12a21a22a23a21a22a31a32a33a31a32)\begin{pmatrix} a_{11} & a_{12} & a_{13} & | & a_{11} & a_{12} \\ a_{21} & a_{22} & a_{23} & | & a_{21} & a_{22} \\ a_{31} & a_{32} & a_{33} & | & a_{31} & a_{32} \end{pmatrix}
  1. Calculate the sum of the products of the diagonals from the top left to the bottom right:
D_1 = a_{11} a_{22} a_{33} + a_{12} a_{23} a_{31} + a_{13} a_{21} a_{32}
D1=a11a22a33+a12a23a31+a13a21a32D_1 = a_{11} a_{22} a_{33} + a_{12} a_{23} a_{31} + a_{13} a_{21} a_{32}
  1. Calculate the sum of the products of the diagonals from the top right to the bottom left:
D_2 = a_{13} a_{22} a_{31} + a_{11} a_{23} a_{32} + a_{12} a_{21} a_{33}
D2=a13a22a31+a11a23a32+a12a21a33D_2 = a_{13} a_{22} a_{31} + a_{11} a_{23} a_{32} + a_{12} a_{21} a_{33}
  1. The determinant is given by the difference between these two sums:
\text{det}(A) = D_1 - D_2
det(A)=D1D2\text{det}(A) = D_1 - D_2

Example

Consider the matrix:

A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}
A=(123456789)A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}

Let's calculate the determinant using the Sarrus method:

  1. Sum of the diagonals from top left to bottom right:
D_1 = 1 \cdot 5 \cdot 9 + 2 \cdot 6 \cdot 7 + 3 \cdot 4 \cdot 8 = 45 + 84 + 96 = 225
D1=159+267+348=45+84+96=225D_1 = 1 \cdot 5 \cdot 9 + 2 \cdot 6 \cdot 7 + 3 \cdot 4 \cdot 8 = 45 + 84 + 96 = 225
  1. Sum of the diagonals from top right to bottom left:
D_2 = 3 \cdot 5 \cdot 7 + 1 \cdot 6 \cdot 8 + 2 \cdot 4 \cdot 9 = 105 + 48 + 72 = 225
D2=357+168+249=105+48+72=225D_2 = 3 \cdot 5 \cdot 7 + 1 \cdot 6 \cdot 8 + 2 \cdot 4 \cdot 9 = 105 + 48 + 72 = 225
  1. Let's calculate the determinant:
\text{det}(A) = D_1 - D_2 = 225 - 225 = 0
det(A)=D1D2=225225=0\text{det}(A) = D_1 - D_2 = 225 - 225 = 0

So, the determinant of the matrix AAA is 000.

Nessun commento:

Posta un commento

Post più popolari