Vés al contingut

Regla de Cramer

De Viki.cat

La regla de Cramer és un teorema, en àlgebra lineal, que dóna la solució d'un sistema lineal d'equacions en termes de determinants. Rep aquest nom en honor a Gabriel Cramer (1704 - 1752).

Sigui <math>A\vec x= \vec b</math> és un sistema d'equacions lineals (A és la matriu de coeficients del sistema, <math>\vec x</math> és el vector columna de les incògnites i <math>\vec b</math> és el vector columna dels termes independents):

<math>A = \begin{pmatrix} a_{11} & \cdots & a_{1n} \\ \vdots & \ddots & \vdots \\ a_{n1} & \cdots & a_{nn}\end{pmatrix}; \vec x = \begin{pmatrix} x_1 \\ x_2 \\ \vdots\\ x_n \end{pmatrix}; \vec b = \begin{pmatrix} b_1 \\ b_2 \\ \vdots\\ b_n \end{pmatrix}</math>

Si <math>\det(A)\ne 0</math>, aleshores la solució del sistema és:

<math>x_j = {\det(A_j) \over \det(A)},\quad j=1,\dots, n,</math>

on <math>A_j</math> és la matriu resultant de reemplaçar la j-èssima columna de la matriu A pel vector columna <math>\vec b</math>, és a dir:

<math>A_j = \begin{pmatrix} a_{11} & \cdots & a_{1,j-1} & b_1 & a_{1,j+1} & \cdots & a_{1n} \\ a_{21} & \ddots & & & & & \vdots \\ \vdots & & \ddots & & & & \vdots \\ \vdots & & & \ddots & & & \vdots \\ \vdots & & & & \ddots & & \vdots \\ \vdots & & & & & \ddots & a_{n-1n} \\ a_{n1} & \cdots & a_{n,j-1} & b_n & a_{n,j+1} & \cdots & a_{nn}\end{pmatrix}</math>

Exemple

Donat el següent sistema d'equacions:

<math>ax+by = {\color{red}e}\,</math>
<math>cx+dy = {\color{red}f}\,</math>

que en forma matricial és:

<math>\begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix}=\begin{pmatrix} {\color{red}e} \\ {\color{red}f} \end{pmatrix}</math>

usant la regla de Cramer:

<math>x = \frac { \begin{vmatrix} {\color{red}e} & b \\ {\color{red}f} & d \end{vmatrix} } { \begin{vmatrix} a & b \\ c & d \end{vmatrix} } = { {\color{red}e}d - b{\color{red}f} \over ad - bc}</math>
<math>y = \frac { \begin{vmatrix} a & {\color{red}e} \\ c & {\color{red}f} \end{vmatrix} } { \begin{vmatrix} a & b \\ c & d \end{vmatrix} } = { a{\color{red}f} - {\color{red}e}c \over ad - bc}</math>