2 Eliminação Gaussiana e Decomposição LU
Dados A e b do sistema A x=b, pede-se:

\mathrm{b}=\left[\begin{array}{c}-2 \\\\ 1 \\\\ 3\end{array}\right], \quad \mathrm{A}=\left[\begin{array}{ccc}2 & 1 & -1 \\\\ 2 & -1 & -15 \\\\ 1 & 1 & 1\end{array}\right]

(a) Utilize eliminação gaussiana para determinar o vetor solução x desse sistema.
(b) Determine a decomposição LU da matriz A.
(d) Use a matrix inversa de A para determinar o vetor solução x=A^{-1} b desse sistema. Compare com a solução obtida no
item (a).

Passo 1

O enunciado dá o sistema linear A x = b com
b=\begin{pmatrix}-2\\[4pt]1\\[4pt]3\end{pmatrix},\qquad A=\begin{pmatrix}2 & 1 & -1\\[4pt]2 & -1 & -15\\[4pt]1 & 1 & 1\end{pmatrix},
e pede:
(a) resolver por eliminação gaussiana e encontrar x;
(b) determinar a decomposição A=LU;
(d) calcular x usando A^{-1} e comparar com o item (a).]

Passo 2

Explicando a ideia da eliminação gaussiana (passo-a-passo, sem pular etapas):
  • Escrevemos a matriz aumentada [A\mid b].
  • Escolhemos um pivô (aqui o elemento a_{11}=2) e eliminamos abaixo dele usando multiplicadores l_{i1}.
  • Repetimos na segunda coluna com o pivô u_{22}.
  • Ao final obtemos uma matriz triangular superior U; daí fazemos substituição regressiva para obter x.
    Vou aplicar isso de forma bem detalhada.

Passo 3

Matriz aumentada inicial:
\left[\begin{array}{ccc|c} 2 & 1 & -1 & -2\\[4pt] 2 & -1 & -15 & 1\\[4pt] 1 & 1 & 1 & 3 \end{array}\right].
Eliminação na coluna 1:
  • Para zerar o elemento (2,1) uso l_{21}=\dfrac{2}{2}=1. Faço R_2\leftarrow R_2 - 1\cdot R_1:
R_2: \\ (2-2,\\\ -1-1,\\\ -15-(-1),\\\ 1-(-2))=(0,\\\ -2,\\\ -14,\\\ 3).
  • Para zerar o elemento (3,1) uso l_{31}=\dfrac{1}{2}=\tfrac{1}{2}. Faço R_3\leftarrow R_3 - \tfrac{1}{2}R_1:
R_3: \\ (1-\tfrac{1}{2}\cdot2,\\\ 1-\tfrac{1}{2}\cdot1,\\\ 1-\tfrac{1}{2}\cdot(-1),\\\ 3-\tfrac{1}{2}\cdot(-2)) =(0,\\ \tfrac{1}{2},\\ \tfrac{3}{2},\\\ 4).
Depois dessas operações a matriz aumentada é
\left[\begin{array}{ccc|c} 2 & 1 & -1 & -2\\[4pt] 0 & -2 & -14 & 3\\[4pt] 0 & \tfrac{1}{2} & \tfrac{3}{2} & 4 \end{array}\right].]

Passo 4

Agora eliminamos o elemento (3,2). O pivô é u_{22}=-2. O multiplicador é
l_{32}=\frac{\tfrac{1}{2}}{-2}=-\tfrac{1}{4}.
Aplicando R_3\leftarrow R_3 - l_{32}R_2 = R_3 - (-\tfrac{1}{4})R_2 = R_3 + \tfrac{1}{4}R_2:
  • Coluna 2: \tfrac{1}{2} + \tfrac{1}{4}(-2)=\tfrac{1}{2}-\tfrac{1}{2}=0.
  • Coluna 3: \tfrac{3}{2} + \tfrac{1}{4}(-14)=\tfrac{3}{2}-\tfrac{14}{4}=\tfrac{3}{2}-\tfrac{7}{2}=-2.
  • RHS: 4 + \tfrac{1}{4}\cdot 3 = 4 + \tfrac{3}{4} = \tfrac{19}{4}.
    A matriz triangular superior final (matriz aumentada) é
\left[\begin{array}{ccc|c} 2 & 1 & -1 & -2\\[4pt] 0 & -2 & -14 & 3\\[4pt] 0 & 0 & -2 & \tfrac{19}{4} \end{array}\right].
Logo a matriz U (triangular superior) é
U=\begin{pmatrix}2 & 1 & -1\\[4pt]0 & -2 & -14\\[4pt]0 & 0 & -2\end{pmatrix}.]

Passo 5

Agora faço substituição regressiva para obter x. Das equações correspondentes às linhas temos:
  • Terceira linha: -2 x_3 = \tfrac{19}{4}. Então
x_3 = -\frac{19}{8}.
  • Segunda linha: -2 x_2 -14 x_3 = 3. Substituindo x_3:
-2 x_2 -14\left(-\frac{19}{8}\right)=3 \quad\Rightarrow\quad -2 x_2 + \frac{266}{8}=3.
Note que \tfrac{266}{8}=\tfrac{133}{4}. Assim
-2 x_2 = 3 - \frac{133}{4} = -\frac{121}{4} \quad\Rightarrow\quad x_2 = \frac{121}{8}.
  • Primeira linha: 2 x_1 + x_2 - x_3 = -2. Substituindo x_2 e x_3:
2 x_1 + \frac{121}{8} -\left(-\frac{19}{8}\right) = -2 \quad\Rightarrow\quad 2 x_1 + \frac{140}{8} = -2.
Como \tfrac{140}{8}=\tfrac{35}{2}, temos
2 x_1 = -2 - \frac{35}{2} = -\frac{39}{2} \quad\Rightarrow\quad x_1 = -\frac{39}{4}.

Passo 6

Portanto a solução encontrada por eliminação gaussiana é
x=\begin{pmatrix}-\tfrac{39}{4}\\[4pt]\tfrac{121}{8}\\[4pt]-\tfrac{19}{8}\end{pmatrix}.
Respirei fundo, é comum aparecerem frações estranhas — está tudo certo até aqui.]

Passo 7

Agora a decomposição A=LU. A ideia didática: os multiplicadores usados durante a eliminação formam a parte subdiagonal de L (com 1s na diagonal), e U é a matriz triangular superior que já encontramos. Os multiplicadores foram:
l_{21}=1,\qquad l_{31}=\tfrac{1}{2},\qquad l_{32}=-\tfrac{1}{4}.
Logo escolhemos L com 1’s na diagonal e esses valores abaixo da diagonal:
L=\begin{pmatrix} 1 & 0 & 0\\[4pt] 1 & 1 & 0\\[4pt] \tfrac{1}{2} & -\tfrac{1}{4} & 1 \end{pmatrix}, \qquad U=\begin{pmatrix} 2 & 1 & -1\\[4pt] 0 & -2 & -14\\[4pt] 0 & 0 & -2 \end{pmatrix}.
Podemos verificar multiplicando L por U (linha a linha) que se recupera A; essa verificação confirma que A=LU.]

Passo 8

Explicando como obter A^{-1} usando LU: para encontrar A^{-1} resolvemos três sistemas A x^{(j)}=e_j (onde e_j são as colunas da identidade). Como A=LU isso significa resolver, para cada j,
L y = e_j \quad\text{(substituição direta)}, \qquad U x^{(j)} = y \quad\text{(substituição regressiva)}.çãçã
As colunas x^{(j)} formam A^{-1}.

Passo 9

Vou calcular a primeira coluna de [A^{-1}) resolvendo A x^{(1)}=e_1.
  1. Resolver L y = e_1:
\begin{cases} y_1 = 1,\\[4pt] y_1 + y_2 = 0 \Rightarrow y_2 = -1,\\[4pt] \tfrac{1}{2}y_1 -\tfrac{1}{4}y_2 + y_3 = 0 \Rightarrow \tfrac{1}{2}\cdot1 -\tfrac{1}{4}(-1) + y_3 = 0 \end{cases}
daí (y_3 = -\tfrac{3}{4}].
  1. Resolver U x^{(1)} = y\): \[\begin{cases} 2 z_1 + z_2 - z_3 = y_1 = 1,\\[4pt] -2 z_2 -14 z_3 = y_2 = -1,\\[4pt] -2 z_3 = y_3 = -\tfrac{3}{4}. \end{cases}
Da última: z_3=\tfrac{3}{8}\]. Segunda: \(-2 z_2 -14\cdot\tfrac{3}{8}=-1 \Rightarrow -2 z_2 = -\tfrac{17}{4}\Rightarrow z_2=-\tfrac{17}{8}. Primeira: 2 z_1 +(-\tfrac{17}{8}) - \tfrac{3}{8}=1 \Rightarrow 2 z_1 = \tfrac{7}{2}\Rightarrow z_1=\tfrac{7}{4}.
Primeira coluna de A^{-1} é \begin{pmatrix}\tfrac{7}{4}\\[4pt]-\tfrac{17}{8}\\[4pt]\tfrac{3}{8}\end{pmatrix}.]

Passo 10

Segunda coluna: resolver A x^{(2)}=e_2.
  1. L y = e_2:
y_1=0,\qquad y_1+y_2=1\Rightarrow y_2=1,\qquad \tfrac{1}{2}y_1-\tfrac{1}{4}y_2+y_3=0\Rightarrow y_3=\tfrac{1}{4}.
  1. U z = y:
-2 z_3 = \tfrac{1}{4}\Rightarrow z_3=-\tfrac{1}{8}.
-2 z_2 -14 z_3 = 1 \Rightarrow -2 z_2 -14(-\tfrac{1}{8})=1 \Rightarrow -2 z_2 + \tfrac{7}{4}=1 \Rightarrow z_2=\tfrac{3}{8}.
2 z_1 + z_2 - z_3 = 0 \Rightarrow 2 z_1 + \tfrac{3}{8} -(-\tfrac{1}{8})=0 \Rightarrow 2 z_1 + \tfrac{1}{2}=0 \Rightarrow z_1=-\tfrac{1}{4}.
Segunda coluna de A^{-1} é \begin{pmatrix}-\tfrac{1}{4}\\[4pt]\tfrac{3}{8}\\[4pt]-\tfrac{1}{8}\end{pmatrix}.]

Passo 11

Terceira coluna: resolver A x^{(3)}=e_3.
  1. L y = e_3:
y_1=0,\qquad y_2=0,\qquad \tfrac{1}{2}y_1-\tfrac{1}{4}y_2+y_3=1\Rightarrow y_3=1.
  1. U z = y:
-2 z_3 = 1 \Rightarrow z_3=-\tfrac{1}{2}.
-2 z_2 -14 z_3 = 0 \Rightarrow -2 z_2 -14(-\tfrac{1}{2})=0 \Rightarrow -2 z_2 +7=0 \Rightarrow z_2=\tfrac{7}{2}.
2 z_1 + z_2 - z_3 = 0 \Rightarrow 2 z_1 + \tfrac{7}{2} -(-\tfrac{1}{2})=0 \Rightarrow 2 z_1 +4=0 \Rightarrow z_1=-2.
Terceira coluna de A^{-1} é \begin{pmatrix}-2\\[4pt]\tfrac{7}{2}\\[4pt]-\tfrac{1}{2}\end{pmatrix}.]

Passo 12

Juntando as colunas, obtemos
A^{-1}=\begin{pmatrix} \tfrac{7}{4} & -\tfrac{1}{4} & -2\\[6pt] -\tfrac{17}{8} & \tfrac{3}{8} & \tfrac{7}{2}\\[6pt] \tfrac{3}{8} & -\tfrac{1}{8} & -\tfrac{1}{2} \end{pmatrix}.
Agora calculo x=A^{-1}b para comparar com o item (a). Faço x=b_1\cdot\text{col}_1 + b_2\cdot\text{col}_2 + b_3\cdot\text{col}_3, com b_1=-2, b_2=1, b_3=3:
x = -2\begin{pmatrix}\tfrac{7}{4}\\[2pt]-\tfrac{17}{8}\\[2pt]\tfrac{3}{8}\end{pmatrix} +1\begin{pmatrix}-\tfrac{1}{4}\\[2pt]\tfrac{3}{8}\\[2pt]-\tfrac{1}{8}\end{pmatrix} +3\begin{pmatrix}-2\\[2pt]\tfrac{7}{2}\\[2pt]-\tfrac{1}{2}\end{pmatrix}.
Somando componente a componente obtemos exatamente
x=\begin{pmatrix}-\tfrac{39}{4}\\[4pt]\tfrac{121}{8}\\[4pt]-\tfrac{19}{8}\end{pmatrix},
que coincide com a solução do item (a).]

Resposta

(a) \displaystyle x=\begin{pmatrix}-\tfrac{39}{4}\\[6pt]\tfrac{121}{8}\\[6pt]-\tfrac{19}{8}\end{pmatrix}
(b) \displaystyle L=\begin{pmatrix}1 & 0 & 0\\[4pt]1 & 1 & 0\\[4pt]\tfrac{1}{2} & -\tfrac{1}{4} & 1\end{pmatrix},\qquad U=\begin{pmatrix}2 & 1 & -1\\[4pt]0 & -2 & -14\\[4pt]0 & 0 & -2\end{pmatrix}
(d) \displaystyle A^{-1}=\begin{pmatrix}\tfrac{7}{4} & -\tfrac{1}{4} & -2\\[6pt]-\tfrac{17}{8} & \tfrac{3}{8} & \tfrac{7}{2}\\[6pt]\tfrac{3}{8} & -\tfrac{1}{8} & -\tfrac{1}{2}\end{pmatrix},\qquad x=A^{-1}b=\begin{pmatrix}-\tfrac{39}{4}\\[6pt]\tfrac{121}{8}\\[6pt]-\tfrac{19}{8}\end{pmatrix}\]

Exercícios relacionados