3.2 Operações

3.2.1 Expansão (\(|c|>1\)) ou contração (\(0<|c|<1\)) de um vetor

\[\begin{equation} c \boldsymbol{x} = \begin{bmatrix} cx_1 \\ cx_2 \\ \vdots \\ cx_n \end{bmatrix} \tag{3.1} \end{equation}\]

10 * 1:5
## [1] 10 20 30 40 50

3.2.2 Expansão (\(|c|>1\)) ou contração (\(0<|c|<1\)) de uma matriz

\[\begin{equation} c X = \begin{bmatrix} cx_{1,1} & cx_{1,2} & \cdots & cx_{1,p} \\ cx_{2,1} & cx_{2,2} & \cdots & cx_{2,p} \\ \vdots & \vdots & \ddots & \vdots \\ cx_{n,1} & cx_{n,2} & \cdots & cx_{n,p} \end{bmatrix} \tag{3.2} \end{equation}\]

10 * matrix(1:9, nrow = 3, byrow = T)
##      [,1] [,2] [,3]
## [1,]   10   20   30
## [2,]   40   50   60
## [3,]   70   80   90

3.2.3 Soma de vetores

\[\begin{equation} \boldsymbol{x} + \boldsymbol{y} = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix} + \begin{bmatrix} y_1 \\ y_2 \\ \vdots \\ y_n \end{bmatrix} = \begin{bmatrix} x_1+y_1 \\ x_2+y_2 \\ \vdots \\ x_n+y_n \end{bmatrix} \tag{3.3} \end{equation}\]

Comutatividade

\(\boldsymbol{x} + \boldsymbol{y} = \boldsymbol{y} + \boldsymbol{x}\)
x <- 1:5
y <- 6:10
x+y
## [1]  7  9 11 13 15
y+x
## [1]  7  9 11 13 15

3.2.4 Soma de matrizes

\[\begin{equation} X + Y = \begin{bmatrix} x_{1,1}+y_{1,1} & x_{1,2}+y_{1,2} & \cdots & x_{1,p}+y_{1,p} \\ x_{2,1}+y_{2,1} & x_{2,2}+y_{2,2} & \cdots & x_{2,p}+y_{2,p} \\ \vdots & \vdots & \ddots & \vdots \\ x_{n,1}+y_{n,1} & x_{n,2}+y_{n,2} & \cdots & x_{n,p}+y_{n,p} \end{bmatrix} \tag{3.4} \end{equation}\]

Comutatividade

\(X+Y = Y+X\)
(X <- matrix(1:6, nrow = 2, byrow = T))
##      [,1] [,2] [,3]
## [1,]    1    2    3
## [2,]    4    5    6
(Y <- matrix(2*(1:6), nrow = 2, byrow = T))
##      [,1] [,2] [,3]
## [1,]    2    4    6
## [2,]    8   10   12
X+Y
##      [,1] [,2] [,3]
## [1,]    3    6    9
## [2,]   12   15   18
Y+X
##      [,1] [,2] [,3]
## [1,]    3    6    9
## [2,]   12   15   18

Exercício 3.4 Sejam as matrizes \(M = \begin{bmatrix} -2 & 1 \\ 0 & 3 \\ 2 & 1 \end{bmatrix}\) e \(N = \begin{bmatrix} 4 & 0 \\ 5 & -3 \\ 8 & 6 \end{bmatrix}\).
a. Obtenha \(\;2M -3N\).
b. \(2M -3N\;\) é igual a \(\;-3N +2M\)? Justifique.

3.2.5 Transposta de uma matriz

Linhas viram colunas, colunas viram linhas.

\[\begin{equation} X = \begin{bmatrix} x_{1,1} & x_{1,2} & \cdots & x_{1,p} \\ x_{2,1} & x_{2,2} & \cdots & x_{2,p} \\ \vdots & \ddots & \cdots & \vdots \\ x_{n,1} & x_{n,2} & \cdots & x_{n,p} \end{bmatrix} \iff X^T = \begin{bmatrix} x_{1,1} & x_{2,1} & \cdots & x_{n,1} \\ x_{1,2} & x_{2,2} & \cdots & x_{n,2} \\ \vdots & \ddots & \cdots & \vdots \\ x_{1,p} & x_{2,p} & \cdots & x_{n,p} \end{bmatrix} \tag{3.5} \end{equation}\]

(X <- matrix(10:15, nrow = 2, byrow = T))
##      [,1] [,2] [,3]
## [1,]   10   11   12
## [2,]   13   14   15
t(X) # transposta
##      [,1] [,2]
## [1,]   10   13
## [2,]   11   14
## [3,]   12   15

3.2.6 Traço de uma matriz (quadrada)

É a soma dos elementos da diagonal principal, denotado por \[\begin{equation} tr(X)=\sum_{i=1}^n x_{ii} \tag{3.6} \end{equation}\]

(X <- matrix(1:9, nrow = 3, byrow = T))
##      [,1] [,2] [,3]
## [1,]    1    2    3
## [2,]    4    5    6
## [3,]    7    8    9
sum(diag(X))  # traço como soma da diagonal
## [1] 15
# matlib::tr(X) # via função

3.2.8 Multiplicação de matrizes

Não comutatividade
\(XY \ne YX\)

Exemplo 3.2 \(\\\)

(X <- matrix(1:9, nrow = 3, byrow = T))
##      [,1] [,2] [,3]
## [1,]    1    2    3
## [2,]    4    5    6
## [3,]    7    8    9
(Y <- matrix(9:1, nrow = 3, byrow = T))
##      [,1] [,2] [,3]
## [1,]    9    8    7
## [2,]    6    5    4
## [3,]    3    2    1
X %*% Y
##      [,1] [,2] [,3]
## [1,]   30   24   18
## [2,]   84   69   54
## [3,]  138  114   90
Y %*% X
##      [,1] [,2] [,3]
## [1,]   90  114  138
## [2,]   54   69   84
## [3,]   18   24   30

Exercício 3.8 Considere o Exemplo 3.2.
a. Realize os cálculos manualmente.
b. Veja a documentação da função crossprod e reproduza os cálculos. \(\\\)

Exercício 3.9 Sejam as matrizes \(A_{n \times p}\), \(B_{n \times q}\) e \(C_{q \times p}\). Verifique se é possível realizar as seguintes operações. Em caso afirmativo, qual a dimensão da matriz resultante?
a. \(AB\).
b. \(BA\).
c. \(AC\).
d. \(CA\).
e. \(BC\).
f. \(CB\).
g. \(ABC\).
h. \(A^{T}BC\).
i. Em algum dos casos acima é possível calcular o traço da matriz resultante? Quais seriam as condições necessárias para este cálculo?

3.2.9 Produto de matrizes termo a termo (produto de Hadamard ou de Schur)

\[\begin{equation} X \circ Y = \begin{bmatrix} x_{1,1} \times y_{1,1} & x_{1,2} \times y_{1,2} & \cdots & x_{1,p} \times y_{1,p} \\ x_{2,1} \times y_{2,1} & x_{2,2} \times y_{2,2} & \cdots & x_{2,p} \times y_{2,p} \\ \vdots & \vdots & \ddots & \vdots \\ x_{n,1} \times y_{n,1} & x_{n,2} \times y_{n,2} & \cdots & x_{n,p} \times y_{n,p} \end{bmatrix} \tag{3.7} \end{equation}\]

Comutatividade

\(X \circ Y = Y \circ X\)

Exemplo 3.3 \(\\\)

(X <- matrix(1:6, nrow = 3, byrow = F))
##      [,1] [,2]
## [1,]    1    4
## [2,]    2    5
## [3,]    3    6
(Y <- matrix(6:1, nrow = 3, byrow = F))
##      [,1] [,2]
## [1,]    6    3
## [2,]    5    2
## [3,]    4    1
X * Y
##      [,1] [,2]
## [1,]    6   12
## [2,]   10   10
## [3,]   12    6

Exercício 3.10 No Exemplo 3.3 verifique que \(X \circ Y=Y \circ X\).

3.2.10 Produto escalar ou produto interno

\[\begin{equation} \boldsymbol{x}' \boldsymbol{y} = x_1 y_1 + x_2 y_2 + \cdots + x_n y_n \tag{3.8} \end{equation}\]

3.2.11 Norma de um vetor

A norma (ou tamanho) de um vetor \(\boldsymbol{x}\) é dada por

\[\begin{equation} L_{\boldsymbol{x}} = ||\boldsymbol{x}|| = \sqrt{x_1^2 + x_2^2 + \cdots + x_n^2} = \sqrt{\boldsymbol{x}'\boldsymbol{x}} \tag{3.9} \end{equation}\]

A multiplicação de um escalar \(c\) por um vetor \(\boldsymbol{x}\) altera seu tamanho.

\[\begin{equation} L_{c\boldsymbol{x}} = \sqrt{c^2 x_1^2 + c^2 x_2^2 + \cdots + c^2 x_n^2} = |c|\sqrt{x_1^2 + x_2^2 + \cdots + x_n^2} = |c|L_{\boldsymbol{x}} \tag{3.10} \end{equation}\]

3.2.12 Ângulo entre dois vetores

\[\begin{equation} \cos(\theta)=\dfrac{\boldsymbol{x}'\boldsymbol{y}}{L_{\boldsymbol{x}} L_{\boldsymbol{y}}} \iff \theta=\arccos \left( \dfrac{\boldsymbol{x}'\boldsymbol{y}}{L_{\boldsymbol{x}} L_{\boldsymbol{y}}} \right) \tag{3.11} \end{equation}\]

Exercício 3.12 Considere os vetores \(\boldsymbol{x}' = \begin{bmatrix} 1 & 3 & 2 \end{bmatrix}\;\) e \(\;\boldsymbol{y}' = \begin{bmatrix} -2 & 1 & -1 \end{bmatrix}\).
a. Encontre \(3\boldsymbol{x}\) e \(\boldsymbol{x}-2\boldsymbol{y}\).
b. Obtenha os produtos escalares \(\boldsymbol{x}'\boldsymbol{y}\) e \(\boldsymbol{y}'\boldsymbol{x}\).
c. A partir da definição (3.9) obtenha os tamanhos de \(\boldsymbol{x}\) e \(\boldsymbol{y}\).
d. A partir da definição (3.11) calcule o ângulo entre \(\boldsymbol{x}\) e \(\boldsymbol{y}\). Veja a documentação da função acos fazendo ?acos.
\(\\\)

Exemplo 3.4 Pode-se utilizar as funções len e angle do pacote matlib para resolver os itens c e d do Exercício 3.12.

library(matlib)
x <- c(1,3,2)
y <- c(-2,1,-1)
# c
matlib::len(x)
## [1] 3.741657
matlib::len(y)
## [1] 2.44949
# d
matlib::angle(x,y, degree = TRUE)  # graus
##          [,1]
## [1,] 96.26395
matlib::angle(x,y, degree = FALSE) # radianos
##          [,1]
## [1,] 1.680123

3.2.13 Dependência linear

Vetores \(\boldsymbol{x}_1, \boldsymbol{x}_2, \ldots, \boldsymbol{x}_n\) são linearmente dependentes se existem constantes \(k_1, k_2, \ldots, k_n\) diferentes de zero tais que \[\begin{equation} k_1 \boldsymbol{x}_1 + k_2 \boldsymbol{x}_2 + \ldots + k_n \boldsymbol{x}_n = \boldsymbol{0} \tag{3.12} \end{equation}\]

Dependência linear implica no fato de que pelo menos um dos vetores pode ser escrito como combinação linear dos demais. Vetores de mesma dimensão que não são linearmente dependentes são chamados linearmente independentes

Exercício 3.14 Verifique se os vetores a seguir são linearmente dependentes.

\[ \boldsymbol{x}_1 = \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix} \;\; \boldsymbol{x}_2 = \begin{bmatrix} 1 \\ 0 \\ -1 \end{bmatrix} \;\; \boldsymbol{x}_3 = \begin{bmatrix} 1 \\ -2 \\ 1 \end{bmatrix} \]

Exemplo 3.5 No Exercício 3.14 pode-se utilizar escalonamento para encontrar a solução do sistema. Pela solução final obtida com a função matlib::echelon, \(k_1=0\), \(k_2=0\) e \(k_3=0\), indicado com coeficientes 1 respectivamente nas posições [1,1], [2,2] e [3,3] e zeros na coluna 4.

A <- matrix(c(1, 1, 1, 0,
              2, 0,-2, 0,
              1,-1, 1, 0), 3, 4, byrow = T)
A
##      [,1] [,2] [,3] [,4]
## [1,]    1    1    1    0
## [2,]    2    0   -2    0
## [3,]    1   -1    1    0
matlib::echelon(A)
##      [,1] [,2] [,3] [,4]
## [1,]    1    0    0    0
## [2,]    0    1    0    0
## [3,]    0    0    1    0

3.2.14 Determinante de uma matriz (quadrada)

É um número (escalar) associado a uma matriz quadrada \(X\), representado por \(|X|\), \(\det X\) ou \(\det(X)\).

(X <- matrix(c(1:4,0,-2,1,0,2), nrow = 3, byrow = T))
##      [,1] [,2] [,3]
## [1,]    1    2    3
## [2,]    4    0   -2
## [3,]    1    0    2
det(X) # determinante
## [1] -20

Exercício 3.16

  1. Pesquise como calcular determinantes de matrizes de ordens 2, 3 e 4.
  2. Veja a documentação da função base::det.
  3. Veja a documentação da função matlib::Det e comente as diferenças da função base::det.
  4. Veja a documentação das funções matlib::cofactor e matlib::rowCofactors. Qual a principal diferença entre as duas?

3.2.15 Inversa de uma matriz (quadrada)

Uma matriz é inversível se e somente se seu determinante é diferente de zero. A inversa de uma matriz \(X\) é anotada por \(X^{-1}\), tal que \[\begin{equation} XX^{-1}=X^{-1}X=I \tag{3.13} \end{equation}\]

Exemplo 3.6 \(\\\)

(X <- matrix(c(1:4,0,-2,1,0,2), nrow = 3, byrow = T))
##      [,1] [,2] [,3]
## [1,]    1    2    3
## [2,]    4    0   -2
## [3,]    1    0    2
det(X) != 0  # inversível pois o determinante é diferente de zero
## [1] TRUE
(inv_X <- solve(X)) # inversa, veja ?base::solve
##      [,1]  [,2] [,3]
## [1,]  0.0  0.20  0.2
## [2,]  0.5  0.05 -0.7
## [3,]  0.0 -0.10  0.4
MASS::fractions(inv_X)
##      [,1]  [,2]  [,3] 
## [1,]     0   1/5   1/5
## [2,]   1/2  1/20 -7/10
## [3,]     0 -1/10   2/5
X %*% inv_X
##      [,1]         [,2]          [,3]
## [1,]    1 2.775558e-17 -1.110223e-16
## [2,]    0 1.000000e+00  0.000000e+00
## [3,]    0 0.000000e+00  1.000000e+00
inv_X %*% X # -2.220446049e-16 aparece por questões numéricas, mas pode ser considerado zero
##      [,1] [,2]          [,3]
## [1,]    1    0  0.000000e+00
## [2,]    0    1 -2.220446e-16
## [3,]    0    0  1.000000e+00

Exercício 3.18 Considere a documentação da função base::solve.
a. Pesquise como calcular inversas de matrizes de ordens 2, 3 e 4.
b. Explique por que o comando base::solve(X) devolve a inversa de X.
c. Resolva o Exemplo 3.6 manualmente.
\(\\\)

A inversa de uma matriz diagonal é facilmente calculada invertendo os elementos da diagonal principal.

\[\begin{equation} X = \begin{bmatrix} x_{1,1} & 0 & \cdots & 0 \\ 0 & x_{2,2} & \cdots & 0 \\ \vdots & \ddots & \cdots & \vdots \\ 0 & 0 & \cdots & x_{n,n} \end{bmatrix} \iff \boldsymbol{X}^{-1} = \begin{bmatrix} \frac{1}{x_{1,1}} & 0 & \cdots & 0 \\ 0 & \frac{1}{x_{2,2}} & \cdots & 0 \\ \vdots & \ddots & \cdots & \vdots \\ 0 & 0 & \cdots & \frac{1}{x_{n,n}} \end{bmatrix} \tag{3.14} \end{equation}\]

(X <- diag(1:4))
##      [,1] [,2] [,3] [,4]
## [1,]    1    0    0    0
## [2,]    0    2    0    0
## [3,]    0    0    3    0
## [4,]    0    0    0    4
(X_inv <- MASS::fractions(diag(1/1:4)))
##      [,1] [,2] [,3] [,4]
## [1,]   1    0    0    0 
## [2,]   0  1/2    0    0 
## [3,]   0    0  1/3    0 
## [4,]   0    0    0  1/4
X %*% X_inv
##      [,1] [,2] [,3] [,4]
## [1,]    1    0    0    0
## [2,]    0    1    0    0
## [3,]    0    0    1    0
## [4,]    0    0    0    1
X_inv %*% X
##      [,1] [,2] [,3] [,4]
## [1,]    1    0    0    0
## [2,]    0    1    0    0
## [3,]    0    0    1    0
## [4,]    0    0    0    1

Exercício 3.19 Considere as matrizes \(A\) e \(B\) a seguir. Determine os resultados a seguir à mão e no R. \[ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix} \;\; B = \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \end{bmatrix} \] a. \(C = A + B^{T}\)
b. \(D = A B\)
c. \(E = A \circ B^{T}\)
d. \(F = 2A\)
e. \(\det(D)\)
f. \(D^{-1}\)
g. \(tr(D)\)
h. \(G=DD^{-1}\). \(G\) é a matriz identidade?

3.2.16 Autovalores e autovetores

Uma matriz quadrada \(A\) possui um autovalor \(\lambda\) com um autovetor correspondente \(\boldsymbol{v_i} \ne \boldsymbol{0}\) se \[\begin{equation} A\boldsymbol{v_i}=\lambda \boldsymbol{v_i} \tag{3.15} \end{equation}\] Pode-se reescrever a Equação (3.15) de forma mais conveniente, primeiramente subtraindo \(\lambda \boldsymbol{v_i}\) em ambos os lados da igualdade. \[ A\boldsymbol{v_i} - \lambda \boldsymbol{v_i} = \boldsymbol{0} \] A seguir insere-se a matriz identidade entre \(\lambda\) e \(\boldsymbol{v_i}\). \[ A\boldsymbol{v_i} - \lambda I \boldsymbol{v_i} = \boldsymbol{0} \] Por fim coloca-se \(\boldsymbol{v_i}\) em evidência. \[ [ A - \lambda I ] \boldsymbol{v_i} = \boldsymbol{0} \] Esta igualdade será satisfeita se \(\boldsymbol{v_i} = \boldsymbol{0}\), \(A - \lambda I = \boldsymbol{0}\) ou, finalmente, \[\begin{equation} |A - \lambda I| = 0 \tag{3.16} \end{equation}\]

Exemplo 3.7 Considere a matriz \(A = \left[ \begin{array}{c c} 2 & 2 \\ -1 & 5 \end{array} \right].\) Aplicando a Equação (3.16) pode-se obter \[ \Biggm\lvert \left[ \begin{array}{c c} 2 & 2 \\ -1 & 5 \end{array} \right] - \lambda \left[ \begin{array}{c c} 1 & 0 \\ 0 & 1 \end{array} \right] \Biggm\lvert = 0 \\ \Biggm\lvert \left[ \begin{array}{c c} 2-\lambda & 2 \\ -1 & 5-\lambda \end{array} \right] \Biggm\lvert = 0 \\ (2-\lambda)(5-\lambda) - (-1 \times 2) = 0 \\ \lambda^2 -7\lambda + 12 = 0 \] Resolvendo a equação de segundo grau em relação a \(\lambda\) obtém-se \[ \lambda_1 = 4 \\ \lambda_2 = 3 \] Para encontrar os autovetores basta substituir os valores de \(\lambda\) na Equação (3.15). Para \(\lambda_1 = 4\) pode-se encontrar \(\boldsymbol{v}_1\): \[ \left[ \begin{array}{c c} 2 & 2 \\ -1 & 5 \end{array} \right] \left[ \begin{array}{c} v_{11} \\ v_{12} \end{array} \right] = 4 \left[ \begin{array}{c} v_{11} \\ v_{12} \end{array} \right] \therefore \left[ \begin{array}{c} 2v_{11}+2v_{12} \\ -v_{11}+5v_{12} \end{array} \right] = \left[ \begin{array}{c} 4v_{11} \\ 4v_{12} \end{array} \right] \therefore \\ \left\{ \begin{array}{l} -2v_{11}+2v_{12}=0 \\ -v_{11}+v_{12}=0 \\ \end{array} \right. \therefore v_{11}=v_{12} \] Para \(\lambda_2 = 3\) pode-se encontrar \(\boldsymbol{v}_2\): \[ \left[ \begin{array}{c c} 2 & 2 \\ -1 & 5 \end{array} \right] \left[ \begin{array}{c} v_{21} \\ v_{22} \end{array} \right] = 3 \left[ \begin{array}{c} v_{21} \\ v_{22} \end{array} \right] \therefore \left[ \begin{array}{c} 2v_{21}+2v_{22} \\ -v_{21}+5v_{22} \end{array} \right] = \left[ \begin{array}{c} 3v_{21} \\ 3v_{22} \end{array} \right] \therefore \\ \left\{ \begin{array}{l} -v_{21}+2v_{22}=0 \\ -v_{21}+2v_{22}=0 \\ \end{array} \right. \therefore v_{21}=2v_{22} \] Desta forma, quaisquer valores não nulos que satisfaçam as equações acima envolvendo \(\boldsymbol{v}_1\) e \(\boldsymbol{v}_2\) são possíveis soluções. Para o autovetor associado a \(\lambda_1 = 4\) foi escolhido por simplicidade \(v_{11}=v_{12}=1\), e para \(\lambda_2 = 3\) escolheu-se \(v_{21}=2\) e \(v_{22}=1\). Assim \[\boldsymbol{v}_1 = \left[ \begin{array}{c} 1 \\ 1 \end{array} \right], \; \boldsymbol{v}_2 = \left[ \begin{array}{c} 2 \\ 1 \end{array} \right].\]

É possível obter um vetor normalizado \(\boldsymbol{\hat{v}}_i\) a partir da Eq. (3.17), multiplicando o vetor original pelo inverso de sua respectiva norma conforme Eq. (3.9).

\[\begin{equation} \boldsymbol{\hat{v}}_i = \frac{1}{||\boldsymbol{v_i}||}\boldsymbol{v_i} \tag{3.17} \end{equation}\]

\[ \boldsymbol{\hat{v}}_1 = \frac{1}{||\boldsymbol{v_1}||}\boldsymbol{v_1} = \left[ \begin{array}{c} \frac{1}{\sqrt{1^2+1^2}} \\ \frac{1}{\sqrt{1^2+1^2}} \end{array} \right] = \left[ \begin{array}{c} \frac{\sqrt{2}}{2} \\ \frac{\sqrt{2}}{2} \end{array} \right] \approx \left[ \begin{array}{c} 0.7071067812 \\ 0.7071067812 \end{array} \right] \\ \boldsymbol{\hat{v}}_2 = \frac{1}{||\boldsymbol{v_2}||}\boldsymbol{v_2} = \left[ \begin{array}{c} \frac{2}{\sqrt{2^2+1^2}} \\ \frac{1}{\sqrt{2^2+1^2}} \end{array} \right] = \left[ \begin{array}{c} \frac{2\sqrt{5}}{5} \\ \frac{\sqrt{5}}{5} \end{array} \right] \approx \left[ \begin{array}{c} 0.8944271910 \\ 0.4472135955 \end{array} \right] \]

Exemplo 3.8 Pode-se realizar o Exemplo 3.7 utilizado a função eigen.

(A <- matrix(c(2,2,-1,5), nrow = 2, byrow = T))
##      [,1] [,2]
## [1,]    2    2
## [2,]   -1    5
eigen(A)
## eigen() decomposition
## $values
## [1] 4 3
## 
## $vectors
##            [,1]       [,2]
## [1,] -0.7071068 -0.8944272
## [2,] -0.7071068 -0.4472136

Note que os autovetores obtidos pela função eigen no Exemplo 3.8 possuem sinal oposto se comparados ao Exemplo 3.7. Segundo a documentação isto é devido à implementação das rotinas do LAPACK (Linear Algebra PACKage) utilizadas pela função eigen. As documentações das funções dgeev e zgeev indicam que

The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

Tais documentações não fornecem, porém, detalhes sobre a inversão do sinal dos autovetores, sendo necessário detalhar o código das funções escritas em Fortran 90 para dirimir esta dúvida.

Exercício 3.22 Como exercício avançado e não obrigatório, acesse os links indicados no Exemplo 3.8 e outros documentos que julgar necessários. Indique em que parte do código ocorre a inversão do sinal dos autovetores. Esta resolução vale 1 ponto adicional no G1, além da referência no material ao(s) aluno(s) que responder(em) esta questão a contento. \(\\\)

Exercício 3.23 Dada a matriz \(A = \begin{bmatrix} 1 & -5 \\ -5 & 1 \end{bmatrix}\), determine os autovalores e autovetores (normalizados) à mão, conferindo no R. \(\\\)

Exercício 3.24 Assita ao vídeo https://www.youtube.com/watch?v=PFDu9oVAE-g. Lembre que é possível ativar a legenda. \(\\\)

Exercício 3.25 Acesse o site https://setosa.io/ev/eigenvectors-and-eigenvalues/ e utilize os recursos gráficos para visualização dos autovalores e autovetores.