Exercício 8.

  • Verifique se a matriz A é simétrica definida positiva.
  • Resolva o SEL Ax = b.
  • Calcule \operatorname{det}(A) e, se possível, A^{-1}.
    i.
A=\left(\begin{array}{lllll} 1 & 1 & 1 & 1 & 1 \\\\ 1 & 2 & 2 & 2 & 2 \\\\ 1 & 2 & 3 & 3 & 3 \\\\ 1 & 2 & 3 & 4 & 4 \\\\ 1 & 2 & 3 & 4 & 5 \end{array}\right), \quad b=\left(\begin{array}{l} 3 \\\\ 1 \\\\ 3 \\\\ 2 \\\\ 3 \end{array}\right)
i i.
A=\left(\begin{array}{rrrr} 25 & -25 & 0 & 15 \\ -25 & 26 & 4 & -12 \\ 0 & 4 & 17 & 9 \\ 15 & -12 & 9 & 36 \end{array}\right), \quad b=\left(\begin{array}{r} 55 \\ -53 \\ 1 \\ 78 \end{array}\right)

Passo 1

Vou listar claramente o que o enunciado nos dá e o que pede para cada item.
Para (i) temos:
  • Matriz
A=\begin{pmatrix} 1 & 1 & 1 & 1 & 1 \\\\ 1 & 2 & 2 & 2 & 2 \\\\ 1 & 2 & 3 & 3 & 3 \\\\ 1 & 2 & 3 & 4 & 4 \\\\ 1 & 2 & 3 & 4 & 5 \end{pmatrix}, \qquad b=\begin{pmatrix}3\\\ 1\\\ 3\\\ 2\\\ 3\end{pmatrix}.
O enunciado pede:
  • Verificar se A é simétrica definida positiva.
  • Resolver o sistema linear A x = b.
  • Calcular \det(A) e, se possível, A^{-1}.
Para (ii) temos:
  • Matriz
A=\begin{pmatrix} 25 & -25 & 0 & 15 \\\\ -25 & 26 & 4 & -12 \\\\ 0 & 4 & 17 & 9 \\\\ 15 & -12 & 9 & 36 \end{pmatrix}, \qquad b=\begin{pmatrix}55\\\ -53\\\ 1\\\ 78\end{pmatrix}.
O enunciado pede as mesmas quatro coisas: verificar simetria e positividade definida, resolver A x=b, calcular \det(A) e, se possível, A^{-1}.

Passo 2

Conceitos rápidos e úteis (mini-aula):
  • Uma matriz A é simétrica se A^T=A. Isto é, a_{ij}=a_{ji} para todos i,j.
  • Para verificar que A é definida positiva podemos usar o critério de Sylvester: A é definida positiva se e somente se todos os menores principais superiores (leading principal minors) têm determinantes positivos, isto é, \Delta_k=\det(A_{k})>0 para k=1,\dots,n, onde A_k é a submatriz formada pelas primeiras k linhas e colunas.
  • Se A é simétrica e definida positiva, existe fatoração de Cholesky A=L L^T com L triangular inferior. Então para resolver Ax=b podemos fazer L y=b (forward substitution) e depois L^T x = y (back substitution).
  • Determinante de A=L L^T é \det(A)=\det(L)^2. Se L tem diagonal fácil (por exemplo, todos uns), o determinante da A fica simples.
  • Para achar A^{-1} uma forma prática é resolver A X = I coluna a coluna: resolver Ax=e_j para j=1,\dots,n.

Passo 3

Item (i) — simetria e verificação de definida positividade
  1. Simetria: Observa-se diretamente que a matriz é igual à sua transposta, pois os elementos na posição (i,j) e (j,i) coincidem. Logo A é simétrica.
  2. Estrutura especial: nota-se que a_{ij}=\min(i,j). Esta é uma matriz bem conhecida (matriz de Gram / de integração discreta) e admite uma fatoração simples. Vou construir explicitamente L tal que A=L L^T.
Defina L como a matriz triangular inferior com todos os elementos iguais a 1 na região triangular inferior (incluindo diagonal), isto é
L=\begin{pmatrix} 1 & 0 & 0 & 0 & 0\\\\ 1 & 1 & 0 & 0 & 0\\\\ 1 & 1 & 1 & 0 & 0\\\\ 1 & 1 & 1 & 1 & 0\\\\ 1 & 1 & 1 & 1 & 1 \end{pmatrix}.
Verificação: para i\ge j temos (L L^T)_{ij}=\sum_{k=1}^{5} L_{ik}L_{jk}=\sum_{k=1}^{\min(i,j)}1=\min(i,j). Logo A=L L^T. Essa é exatamente uma fatoração de Cholesky (com L real).
  1. Como A=L L^T com L invertível, A é definida positiva (todos os vetores x\neq0 têm x^T A x=\|L^T x\|^2>0). Mas também podemos checar Sylvester: os determinantes principais \Delta_k serão \det(L_k)^2 e como L_k tem todos 1 na diagonal, \det(L_k)=1, então \Delta_k=1>0 para todo k. Conclusão: A é simétrica definida positiva.

Passo 4

Item (i) — resolver [A x = b) usando A=L L^T
  1. Resolvendo L y = b (forward substitution). Escrevo as equações do sistema L y=b. Como L tem estrutura de somas prefixas:
\begin{cases} y_1 = b_1,\\\ y_1+y_2 = b_2,\\\ y_1+y_2+y_3 = b_3,\\\ y_1+y_2+y_3+y_4 = b_4,\\\ y_1+y_2+y_3+y_4+y_5 = b_5. \end{cases}
Substituindo b=(3,1,3,2,3)^T\] obtemos: \[\begin{aligned} y_1 &= 3,\\\ y_2 &= b_2-y_1 = 1-3 = -2,\\\ y_3 &= b_3-(y_1+y_2) = 3-(3-2)=2,\\\ y_4 &= b_4-(y_1+y_2+y_3)=2-3=-1,\\\ y_5 &= b_5-(y_1+y_2+y_3+y_4)=3-2=1. \end{aligned}\] Logo \[y=(3,-2,2,-1,1)^T.
  1. Agora resolver L^T x = y. As equações de L^T x = y são somas suffixas (porque L^T é triangular superior com uns):
\begin{cases} x_1+x_2+x_3+x_4+x_5 = y_1,\\\ x_2+x_3+x_4+x_5 = y_2,\\\ x_3+x_4+x_5 = y_3,\\\ x_4+x_5 = y_4,\\\ x_5 = y_5. \end{cases}
Substituindo (y] e retro-substituindo:
\begin{aligned} x_5 &= 1,\\\ x_4 &= y_4 - x_5 = -1 - 1 = -2,\\\ x_3 &= y_3 - x_4 - x_5 = 2 -(-2) -1 = 3,\\\ x_2 &= y_2 - x_3 - x_4 - x_5 = -2 -3 -(-2) -1 = -4,\\\ x_1 &= y_1 - (x_2+x_3+x_4+x_5) = 3 -(-4+3-2+1) = 5. \end{aligned}
Portanto a solução é
x=\begin{pmatrix}5\\\ -4\\\ 3\\\ -2\\\ 1\end{pmatrix}.

Passo 5

Item (i) — determinante e inversa
  1. Determinante: como A=L L^T e \det(L)=1 (produto dos elementos da diagonal de L, todos iguais a 1), temos
\det(A)=\det(L)^2=1.
  1. Inversa: podemos usar A^{-1}=L^{-T}L^{-1}. Primeiro note que L^{-1} é a matriz triangular inferior com 1 na diagonal e -1 na subdiagonal imediata, isto é, para i\ge1
(L^{-1})_{ii}=1,\qquad (L^{-1})_{i,i-1}=-1\\ (i\ge2),
todas as outras entradas zero. Logo ao calcular A^{-1}=L^{-T}L^{-1}=(L^{-1})^T (L^{-1}) obtém-se uma matriz tridiagonal com padrão conhecido:
  • Na diagonal principal: 2 para as posições 1 a 4 e 1 na posição 5.
  • Nas sub- e super-diagonais imediatas: -1.
Portanto
A^{-1}=\begin{pmatrix} 2 & -1 & 0 & 0 & 0\\\\ -1 & 2 & -1 & 0 & 0\\\\ 0 & -1 & 2 & -1 & 0\\\\ 0 & 0 & -1 & 2 & -1\\\\ 0 & 0 & 0 & -1 & 1 \end{pmatrix}.
Observação rápida: essa é a inversa clássica da matriz (\min(i,j))_{i,j}.

Passo 6

Passando ao item (ii) — simetria e verificação de definida positividade
  1. Simetria: observa-se diretamente que A^T=A (os elementos espelhados são iguais), logo A é simétrica.
  2. Critério de Sylvester (cálculo dos menores principais superiores):
  • \Delta_1=\det\begin{pmatrix}25\end{pmatrix}=25>0.
  • \Delta_2=\det\begin{pmatrix}25 & -25\\\\ -25 & 26\end{pmatrix}=25\cdot26-(-25)^2=650-625=25>0.
  • \Delta_3=\det\begin{pmatrix}25 & -25 & 0\\\\ -25 & 26 & 4\\\\ 0 & 4 & 17\end{pmatrix}.
Calcule \Delta_3 explicitamente (expansão por Laplace na primeira linha):
\Delta_3 = 25\det\begin{pmatrix}26&4\\\ 4&17\end{pmatrix} -(-25)\det\begin{pmatrix}-25&4\\\ 0&17\end{pmatrix} =25(26\cdot17-4\cdot4)-(-25)(-25\cdot17-0).
Compute dentro:
26\cdot17-16=442-16=426,\qquad -25\cdot17=-425.
Logo
\Delta_3 =25\cdot426 -(-25)(-425)=25(426-425)=25>0.
  • \Delta_4=\det(A) (o menor principal de ordem 4). Vou calcular \det(A) fazendo eliminação Gaussiana preservando determinante (apenas usando operações do tipo R_i\leftarrow R_i-\lambda R_j que não alteram o determinante).
Matriz inicial e operações (mostrando passos chave):
\begin{pmatrix} 25 & -25 & 0 & 15\\\\ -25 & 26 & 4 & -12\\\\ 0 & 4 & 17 & 9\\\\ 15 & -12 & 9 & 36 \end{pmatrix}.
  • R_2\leftarrow R_2+R_1 e R_4\leftarrow R_4-\tfrac{3}{5}R_1 (essas operações preservam \det). Obtemos a submatriz de trabalho:
\begin{pmatrix} 25 & -25 & 0 & 15\\\\ 0 & 1 & 4 & 3\\\\ 0 & 4 & 17 & 9\\\\ 0 & 3 & 9 & 27 \end{pmatrix}.
  • Com pivô 1 na posição (2,2): R_3\leftarrow R_3-4R_2,\; R_4\leftarrow R_4-3R_2 dando
\begin{pmatrix} 25 & -25 & 0 & 15\\\\ 0 & 1 & 4 & 3\\\\ 0 & 0 & 1 & -3\\\\ 0 & 0 & -3 & 18 \end{pmatrix}.
  • Finalmente R_4\leftarrow R_4+3R_3 produz a forma triangular superior final
\begin{pmatrix} 25 & * & * & *\\\\ 0 & 1 & * & *\\\\ 0 & 0 & 1 & *\\\\ 0 & 0 & 0 & 9 \end{pmatrix}.
Assim os pivôs diagonais são 25,1,1,9 e
\det(A)=25\cdot1\cdot1\cdot9=225>0.
Como todos os menores principais superiores \Delta_1,\Delta_2,\Delta_3,\Delta_4 são positivos, por Sylvester A é simétrica definida positiva.

Passo 7

Item (ii) — resolver A x = b usando a eliminação já feita
Reuso a eliminação que levou à forma triangular superior U. A matriz U obtida nas operações foi
U=\begin{pmatrix} 25 & -25 & 0 & 15\\\\ 0 & 1 & 4 & 3\\\\ 0 & 0 & 1 & -3\\\\ 0 & 0 & 0 & 9 \end{pmatrix}.
As mesmas operações aplicadas à direita b produzem o vetor transformado y tal que U x = y. Vou reproduzir a operação sobre b=(55,-53,1,78)^T:
  1. R_2\leftarrow R_2+R_1: b_2\leftarrow -53+55=2.
    R_4\leftarrow R_4-\tfrac{3}{5}R_1: b_4\leftarrow 78-\tfrac{3}{5}\cdot55=78-33=45.
    Fica b=(55,2,1,45)^T.
  2. Com pivô 1 na linha 2: R_3\leftarrow R_3-4R_2: b_3\leftarrow 1-4\cdot2=-7.
    R_4\leftarrow R_4-3R_2: b_4\leftarrow 45-3\cdot2=39.
    Fica b=(55,2,-7,39)^T.
  3. R_4\leftarrow R_4+3R_3: b_4\leftarrow 39+3\cdot(-7)=18.
    Assim o vetor direito final é y=(55,2,-7,18)^T.
Agora retro-substituição em U x = y:
\begin{aligned} 9x_4 &= 18 \Rightarrow x_4=2,\\\ x_3-3x_4 &= -7 \Rightarrow x_3=-7+3\cdot2=-1,\\\ x_2+4x_3+3x_4 &= 2 \Rightarrow x_2 = 2 -4(-1)-3\cdot2 = 0,\\\\ 25x_1-25x_2+15x_4 &=55 \Rightarrow 25x_1 =55-15\cdot2=25 \Rightarrow x_1=1. \end{aligned}
Logo
x=\begin{pmatrix}1\\\ 0\\\ -1\\\ 2\end{pmatrix}.

Passo 8

Item (ii) — determinante (já encontrado) e cálculo de A^{-1}
  1. Determinante: já obtivemos \det(A)=25\cdot1\cdot1\cdot9=225.
  2. Cálculo de A^{-1} (método prático): resolvemos A x = e_j para j=1,\dots,4 usando exatamente as mesmas operações (as mesmas transformações que tornaram A em U). Vou apresentar rapidamente o procedimento e os resultados (cada coluna de A^{-1} é a solução do respectivo sistema).
  • Coluna 1: solução de A x = e_1
x^{(1)}=\begin{pmatrix} \tfrac{1102}{25}\\[4pt]43\\[4pt]-\tfrac{46}{5}\\[4pt]-\tfrac{26}{15}\end{pmatrix}.
  • Coluna 2: solução de A x = e_2
x^{(2)}=\begin{pmatrix}43\\[4pt]42\\[4pt]-9\\[4pt]-\tfrac{5}{3}\end{pmatrix}.
  • Coluna 3: solução de A x = e_3
x^{(3)}=\begin{pmatrix}-\tfrac{46}{5}\\[4pt]-9\\[4pt]2\\[4pt]\tfrac{1}{3}\end{pmatrix}.
  • Coluna 4: solução de A x = e_4
x^{(4)}=\begin{pmatrix}-\tfrac{26}{15}\\[4pt]-\tfrac{5}{3}\\[4pt]\tfrac{1}{3}\\[4pt]\tfrac{1}{9}\end{pmatrix}.
Como A é simétrica, a matriz formada por essas colunas é simétrica (checável). Assim
A^{-1}=\begin{pmatrix} \tfrac{1102}{25} & 43 & -\tfrac{46}{5} & -\tfrac{26}{15} \\[4pt] 43 & 42 & -9 & -\tfrac{5}{3} \\[4pt] -\tfrac{46}{5} & -9 & 2 & \tfrac{1}{3} \\[4pt] -\tfrac{26}{15} & -\tfrac{5}{3} & \tfrac{1}{3} & \tfrac{1}{9} \end{pmatrix}.
(Se desejar, dá para multiplicar A por essa matriz e verificar que o produto é a identidade.)]

Resposta

(i) A é simétrica definida positiva; \;x=\begin{pmatrix}5\\\ -4\\\ 3\\\ -2\\\ 1\end{pmatrix}; \det(A)=1;
A^{-1}=\begin{pmatrix} 2 & -1 & 0 & 0 & 0\\\\ -1 & 2 & -1 & 0 & 0\\\\ 0 & -1 & 2 & -1 & 0\\\\ 0 & 0 & -1 & 2 & -1\\\\ 0 & 0 & 0 & -1 & 1 \end{pmatrix}.
(ii) A é simétrica definida positiva; \;x=\begin{pmatrix}1\\\ 0\\\ -1\\\ 2\end{pmatrix}; \det(A)=225;
A^{-1}=\begin{pmatrix} \tfrac{1102}{25} & 43 & -\tfrac{46}{5} & -\tfrac{26}{15} \\[4pt] 43 & 42 & -9 & -\tfrac{5}{3} \\[4pt] -\tfrac{46}{5} & -9 & 2 & \tfrac{1}{3} \\[4pt] -\tfrac{26}{15} & -\tfrac{5}{3} & \tfrac{1}{3} & \tfrac{1}{9} \end{pmatrix}.

Exercícios relacionados