Ir para o conteúdo

Capítulo 1 — Vetores, matrizes e sistemas lineares

Depois de estudar expressões (Volume 1) e funções lineares (Volume 2), avançamos para a linguagem de Álgebra Linear. Aqui, organizamos múltiplas equações com vetores e matrizes.

1.1 Vetores em \(\mathbb{R}^2\) e \(\mathbb{R}^3\)

Um vetor em \(\mathbb{R}^2\) pode ser escrito como

\[ \mathbf{v} = \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} \]

Exemplo:

\[ \mathbf{u}=\begin{bmatrix}1\\2\end{bmatrix}, \quad \mathbf{v}=\begin{bmatrix}3\\-1\end{bmatrix} \]

Soma de vetores:

\[ \mathbf{u}+\mathbf{v}=\begin{bmatrix}1+3\\2+(-1)\end{bmatrix}=\begin{bmatrix}4\\1\end{bmatrix} \]

Multiplicação por escalar:

\[ 2\mathbf{u}=\begin{bmatrix}2\\4\end{bmatrix} \]

1.2 Matrizes e notação de sistema

Uma matriz \(A\in\mathbb{R}^{2\times 2}\) pode ser escrita como

\[ A=\begin{bmatrix}2 & 1\\1 & -1\end{bmatrix} \]

e um vetor de incógnitas como

\[ \mathbf{x}=\begin{bmatrix}x_1\\x_2\end{bmatrix}, \quad \mathbf{b}=\begin{bmatrix}5\\1\end{bmatrix} \]

Então o sistema linear é representado por

\[ A\mathbf{x}=\mathbf{b} \]

que equivale ao sistema escalar:

Equação Forma escalar
1 \(2x_1 + x_2 = 5\)
2 \(x_1 - x_2 = 1\)

1.3 Exemplo resolvido de sistema linear

Resolver o sistema:

\[ \begin{cases} 2x_1 + x_2 = 5 \\ x_1 - x_2 = 1 \end{cases} \]

Somando as equações:

\[ 3x_1 = 6 \Rightarrow x_1=2 \]

Substituindo em \(x_1-x_2=1\):

\[ 2-x_2=1 \Rightarrow x_2=1 \]

Solução vetorial:

\[ \mathbf{x}=\begin{bmatrix}2\\1\end{bmatrix} \]

Verificação matricial (derivação curta)

\[ \begin{aligned} A\mathbf{x} &= \begin{bmatrix}2 & 1\\1 & -1\end{bmatrix} \begin{bmatrix}2\\1\end{bmatrix} \\ &= \begin{bmatrix}2\cdot 2 + 1\cdot 1\\1\cdot 2 + (-1)\cdot 1\end{bmatrix} \\ &= \begin{bmatrix}5\\1\end{bmatrix} = \mathbf{b} \end{aligned} \]

1.4 Pseudo-código de substituição simples

algoritmo resolver_sistema_2x2(a11, a12, b1, a21, a22, b2)
    # exemplo didático: elimina x2 por combinação linear
    d <- a11*a22 - a12*a21
    se d = 0 então
        retornar "sistema sem solução única"
    fim_se
    x1 <- (b1*a22 - a12*b2)/d
    x2 <- (a11*b2 - b1*a21)/d
    retornar (x1, x2)
fim

Essa estrutura prepara o caminho para métodos numéricos e aplicações computacionais em engenharia.