Matrizes

Apostilas

Csaba Schneider

2025-01-01

Definição de uma Matriz

Definition 1 Uma matriz \(A\), \(m \times n\) (\(m\) por \(n\)), é uma tabela de \(m \cdot n\) números dispostos em \(m\) linhas e \(n\) colunas:

\[ A = \begin{bmatrix} a_{11} & a_{12} & \ldots & a_{1n} \\ a_{21} & a_{22} & \ldots & a_{2n} \\ \vdots & & \ldots & \vdots \\ a_{m1} & a_{m2} & \ldots & a_{mn} \end{bmatrix} \]

A \(i\)-ésima linha de \(A\) é \(\begin{bmatrix} a_{i1} & a_{i2} & \ldots & a_{in} \end{bmatrix}\) A \(j\)-ésima coluna de \(A\) é \(\begin{bmatrix} a_{1j} \\ a_{2j} \\ \vdots \\ a_{mj} \end{bmatrix}\).

Nós também usamos a notação \(A = \left(a_{ij}\right)_{m \times n}\). Aqui, \(a_{ij}\) ou \([A]_{ij}\) é o elemento ou entrada na posição \((i, j)\) da matriz \(A\).

Exemplos de Matrizes

Considere as seguintes matrizes:

\[ A = \begin{bmatrix} 1/2 & 2/3 \\ 3 & 4/5 \end{bmatrix}, \quad B = \begin{bmatrix} -2 & 1 \\ 0 & 3 \end{bmatrix}, \quad C = \begin{bmatrix} 1 & 3 & 0 \\ 2 & 4 & -2 \end{bmatrix}, \quad D = \begin{bmatrix} 1 & 2 & 3 \end{bmatrix}, \quad E = \begin{bmatrix} 4 \\ 5 \\ 6 \end{bmatrix}. \]

  • As matrizes \(A\) e \(B\) são \(2 \times 2\) (2 linhas e 2 colunas, matriz quadrada).
  • A matriz \(C\) é \(2 \times 3\) (2 linhas e 3 colunas).
  • A matriz \(D\) é \(1 \times 3\) (1 linha e 3 colunas, matriz linha, vetor linha).
  • A matriz \(E\) é \(3 \times 1\) (3 linhas e 1 coluna, matriz coluna, vetor coluna).

Duas matrizes \(A=(a_{ij})\) a \(B=(b_{ij})\) são iguais, se elas

  1. têm o mesmo tamanho e
  2. \(a_{ij}=b_{ij}\) para todo \(i,j\) (têm as mesmas entradas)

Soma de Matrizes

A soma de duas matrizes do mesmo tamanho, \(A = \left(a_{ij}\right)_{m \times n}\) e \(B = \left(b_{ij}\right)_{m \times n}\), é definida como:

\[ C = A + B\quad \mbox{onde}\quad c_{ij} = a_{ij} + b_{ij}. \]

Exemplo

Considere as matrizes:

\[ A = \begin{bmatrix} 1 & 2 & -3 \\ 3 & 4 & 0 \end{bmatrix}, \quad B = \begin{bmatrix} -2 & 1 & 5 \\ 0 & 3 & -4 \end{bmatrix}. \]

A soma de \(A\) e \(B\) é:

\[ C = A + B = \begin{bmatrix} 1 + (-2) & 2 + 1 & -3 + 5 \\ 3 + 0 & 4 + 3 & 0 + (-4) \end{bmatrix} = \begin{bmatrix} -1 & 3 & 2 \\ 3 & 7 & -4 \end{bmatrix}. \]

Matriz Nula

A matriz nula (matriz zero) de tamanho \(m \times n\), denotada por \(0_{m\times n}\) (ou simplesmente \(0\) quando o tamanho é claro), é a matriz em que todas as entradas são zero:

\[ 0_{2\times 3} = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}. \]

Para qualquer matriz \(A\) de tamanho \(m \times n\), vale \(A + 0_{m\times n} = A\).

Exemplo

Se \[ A = \begin{bmatrix} 1 & -2 & 3 \\ 0 & 4 & -1 \end{bmatrix}, \quad 0 = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}, \] então \[ A + 0 = \begin{bmatrix} 1+0 & -2+0 & 3+0 \\ 0+0 & 4+0 & -1+0 \end{bmatrix} = \begin{bmatrix} 1 & -2 & 3 \\ 0 & 4 & -1 \end{bmatrix} = A. \]

Múltiplo Escalar de uma Matriz

O múltiplo escalar de uma matriz \(A = \left(a_{ij}\right)_{m \times n}\) por um escalar \(\alpha\) é definido como:

\[ B = \alpha A\quad \mbox{onde}\quad b_{ij} = \alpha a_{ij}. \]

Exemplo

Considere a matriz:

\[ A = \begin{bmatrix} -2 & 1 \\ 0 & 3 \\ 5 & -4 \end{bmatrix}. \]

O múltiplo de \(A\) pelo escalar \(-3\) é:

\[ -3A = \begin{bmatrix} (-3)\cdot(-2) & (-3)\cdot 1 \\ (-3)\cdot 0 & (-3)\cdot 3 \\ (-3)\cdot 5 & (-3)\cdot (-4) \end{bmatrix} = \begin{bmatrix} 6 & -3 \\ 0 & -9 \\ -15 & 12 \end{bmatrix}. \]

Simétrica de uma Matriz

A simétrica/negativa de uma matriz \(A\) é definida por \(-A = (-1)A\). Em particular, se \(A = (a_{ij})\), então \[ -A = (-a_{ij}). \]

Exemplo

Considere \[ A = \begin{bmatrix} 2 & -3 \\ 1 & 4 \end{bmatrix} \quad \Rightarrow \quad -A = (-1)A = \begin{bmatrix} -2 & 3 \\ -1 & -4 \end{bmatrix}. \]

Além disso, vale a propriedade \(A + (-A) = 0\). No exemplo acima, \[ A + (-A) = \begin{bmatrix} 2+(-2) & -3+3 \\ 1+(-1) & 4+(-4) \end{bmatrix} = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} = 0_{2\times 2}. \]

Transposta de uma Matriz

A transposta de uma matriz \(A = \left(a_{ij}\right)_{m \times n}\) é a matriz \(A^T = \left(a_{ji}\right)_{n \times m}\) obtida trocando as linhas por colunas.

Exemplo

Considere a matriz:

\[ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}. \]

A transposta de \(A\) é:

\[ A^T = \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \end{bmatrix}. \]

Multiplicação entre Matrizes

O produto de duas matrizes \(A = \left(a_{ij}\right)_{m \times p}\) e \(B = \left(b_{ij}\right)_{p \times n}\) é definido como:

\[ C = AB \]

onde a matriz resultante \(C = \left(c_{ij}\right)_{m \times n}\) tem entradas dadas por:

\[ c_{ij} = a_{i1}b_{1j} + a_{i2}b_{2j} + \cdots + a_{ip}b_{pj} = \sum_{k=1}^{p} a_{ik} b_{kj}. \]

\[ A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1p}\\ \vdots & \vdots & \ddots & \vdots \\ \color{red}{a_{i1}} & \color{red}{a_{i2}} & \cdots & \color{red}{a_{ip}}\\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mp} \end{bmatrix},\quad B = \begin{bmatrix} b_{11} & \cdots & \color{blue}{b_{1j}} & \cdots & b_{1n}\\ b_{21} & \cdots & \color{blue}{b_{2j}} & \cdots & b_{2n}\\ \vdots & \ddots & \vdots & \ddots & \vdots \\ b_{p1} & \cdots & \color{blue}{b_{pj}} & \cdots & b_{pn} \end{bmatrix},\quad c_{ij} = \sum\limits_{k=1}^{p} \color{red}{a_{ik}}\,\color{blue}{b_{kj}} \]

Condições para Multiplicação de Matrizes

  • O número de colunas de \(A\) deve ser igual ao número de linhas de \(B\).
  • A matriz resultante \(C\) terá dimensões \(m \times n\).

Exemplo: Produto de Matrizes

Considere as matrizes:

\[ A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{bmatrix}_{2\times 3}, \quad B = \begin{bmatrix} 7 & {8} \\ 9 & {10} \\ 11 & {12} \end{bmatrix}_{3\times 2}. \] O produto vai ser uma matriz \(2\times 2\): \[ C=\begin{bmatrix} c_{11} & c_{12} \\ c_{21} & c_{22}\end{bmatrix}_{2\times 2} \]

Considere as matrizes:

\[ A = \begin{bmatrix} \color{red}{1} & \color{red}{2} & \color{red}{3} \\ 4 & 5 & 6 \end{bmatrix}, \quad B = \begin{bmatrix} \color{blue}{7} & 8 \\ \color{blue}{9} & 10 \\ \color{blue}{11} & 12 \end{bmatrix}. \]

Para calcular \(c_{11}\), multiplicamos a primeira linha de \(A\) pela primeira coluna de \(B\): \[ c_{11} = \color{red}{1}\cdot \color{blue}{7} + \color{red}{2}\cdot \color{blue}{9} + \color{red}{3}\cdot \color{blue}{11} = 7 + 18 + 33 = 58. \] O produto vai ser uma matriz \(2\times 2\): \[ C=\begin{bmatrix} 58 & c_{12} \\ c_{21} & c_{22}\end{bmatrix} \]

Considere as matrizes:

\[ A = \begin{bmatrix} \color{red}{1} & \color{red}{2} & \color{red}{3} \\ 4 & 5 & 6 \end{bmatrix}, \quad B = \begin{bmatrix} 7 & \color{blue}{8} \\ 9 & \color{blue}{10} \\ 11 & \color{blue}{12} \end{bmatrix}. \]

Para calcular \(c_{12}\), multiplicamos a primeira linha de \(A\) pela segunda coluna de \(B\): \[ c_{12} = \color{red}{1}\cdot \color{blue}{8} + \color{red}{2}\cdot \color{blue}{10} + \color{red}{3}\cdot \color{blue}{12} = 8 + 20 + 36 = 64. \] O produto vai ser uma matriz \(2\times 2\): \[ C=\begin{bmatrix} 58 & 64 \\ c_{21} & c_{22}\end{bmatrix} \]

Considere as matrizes:

\[ A = \begin{bmatrix} 1 & 2 & 3 \\ \color{red}{4} & \color{red}{5} & \color{red}{6} \end{bmatrix}, \quad B = \begin{bmatrix} \color{blue}{7} & 8 \\ \color{blue}{9} & 10 \\ \color{blue}{11} & 12 \end{bmatrix}. \]

Para calcular \(c_{21}\), multiplicamos a segunda linha de \(A\) pela primeira coluna de \(B\): \[ c_{21} = \color{red}{4}\cdot \color{blue}{7} + \color{red}{5}\cdot \color{blue}{9} + \color{red}{6}\cdot \color{blue}{11} = 28 + 45 + 66 = 139. \] O produto vai ser uma matriz \(2\times 2\): \[ C=\begin{bmatrix} 58 & 64 \\ 139 & c_{22}\end{bmatrix} \]

Considere as matrizes:

\[ A = \begin{bmatrix} 1 & 2 & 3 \\ \color{red}{4} & \color{red}{5} & \color{red}{6} \end{bmatrix}, \quad B = \begin{bmatrix} 7 & \color{blue}{8} \\ 9 & \color{blue}{10} \\ 11 & \color{blue}{12} \end{bmatrix}. \]

Para calcular \(c_{22}\), multiplicamos a segunda linha de \(A\) pela segunda coluna de \(B\): \[ c_{22} = \color{red}{4}\cdot \color{blue}{8} + \color{red}{5}\cdot \color{blue}{10} + \color{red}{6}\cdot \color{blue}{12} = 32 + 50 + 72 = 154. \] O produto vai ser uma matriz \(2\times 2\): \[ C=\begin{bmatrix} 58 & 64 \\ 139 & 154 \end{bmatrix} \]

Matriz Identidade

A matriz identidade de ordem \(n\), denotada por \(I_n\) ou simplesmente por \(I\), é a matriz quadrada \(n \times n\) com \(1\) na diagonal principal e \(0\) fora dela.

Exemplo

\[ I_3 = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}. \]

Propriedade

Para qualquer matriz \(A\) \({m\times n}\), a matriz identidade satisfaz:

\[ I_m\,A = A \quad\text{e}\quad A\,I_n = A. \]

Exemplo (com \(m=n=2\)):

\[ I_2 = \begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix},\quad A = \begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix}. \]

\[ I_2A = \begin{bmatrix}1 & 0 \\ 0 & 1\end{bmatrix}\! \begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix} = \begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix} = A,\qquad A I_2 = \begin{bmatrix}1 & 2 \\ 3 & 4\end{bmatrix}. \]

Propriedades das Operações com Matrizes

Adição de Matrizes

  1. Propriedade Comutativa: \(A + B = B + A\)
  2. Propriedade Associativa: \((A + B) + C = A + (B + C)\)
  3. Identidade Aditiva: \(A + 0 = A\), onde \(0\) é a matriz zero.
  4. Inverso Aditivo: \(A + (-A) = 0\)

Multiplicação Escalar

  1. Propriedade Distributiva: \(\alpha(A + B) = \alpha A + \alpha B\)
  2. Propriedade Associativa: \((\alpha \beta)A = \alpha(\beta A)\)
  3. Identidade Multiplicativa: \(1 \cdot A = A\)

Multiplicação de Matrizes

  1. Propriedade Associativa: \((AB)C = A(BC)\)
  2. Propriedade Distributiva: \(A(B + C) = AB + AC\) e \((A + B)C = AC + BC\)
  3. Compatibilidade da Multiplicação Escalar: \(\alpha(AB) = (\alpha A)B = A(\alpha B)\)
  4. Se \(A\) é matriz \(m\times n\), então \(I_mA=AI_n=A\)
  5. Não-Comutatividade: Em geral, \(AB \neq BA\)

Multiplicação Não Comutativa

Vamos ilustrar que, em geral, \(AB \neq BA\).

Considere \[ A = \begin{bmatrix}1 & 2 \\ 0 & 1\end{bmatrix}, \quad B = \begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix}. \]

Calculando \(AB\) e \(BA\): \[ AB = \begin{bmatrix}1 & 2 \\ 0 & 1\end{bmatrix} \begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix} = \begin{bmatrix}2 & 1 \\ 1 & 0\end{bmatrix},\qquad BA = \begin{bmatrix}0 & 1 \\ 1 & 0\end{bmatrix} \begin{bmatrix}1 & 2 \\ 0 & 1\end{bmatrix} = \begin{bmatrix}0 & 1 \\ 1 & 2\end{bmatrix}. \]

Conclusão: \(AB = \begin{bmatrix}2 & 1 \\ 1 & 0\end{bmatrix} \neq \begin{bmatrix}0 & 1 \\ 1 & 2\end{bmatrix} = BA\)

Transposta

  1. Dupla transposição: \((A^T)^T = A\).
  2. Transposição da soma (mesmas dimensões): \((A + B)^T = A^T + B^T\).
  3. Transposição do produto por escalar: \((\alpha A)^T = \alpha A^T\).
  4. Transposição do produto (dimensões compatíveis): \((AB)^T = B^T A^T\).
  5. Simetria: \(A\) é simétrica se \(A^T = A\) e antissimétrica se \(A^T = -A\).

Propriedade: transposta do produto

Para matrizes de tamanhos compatíveis, vale a identidade \[ (AB)^{T} = B^{T} A^{T}. \]

Exemplo pequeno (matrizes \(2\times 2\)): \[ A = \begin{bmatrix}1 & 2\\ 3 & 0\end{bmatrix},\quad B = \begin{bmatrix}0 & 4\\ 5 & -1\end{bmatrix}. \] Então \[ AB = \begin{bmatrix} 1\cdot 0 + 2\cdot 5 & 1\cdot 4 + 2\cdot(-1)\\ 3\cdot 0 + 0\cdot 5 & 3\cdot 4 + 0\cdot(-1) \end{bmatrix} = \begin{bmatrix}10 & 2\\ 0 & 12\end{bmatrix},\quad (AB)^{T} = \begin{bmatrix}10 & 0\\ 2 & 12\end{bmatrix}. \]

Por outro lado, \[ B^{T} = \begin{bmatrix}0 & 5\\ 4 & -1\end{bmatrix},\quad A^{T} = \begin{bmatrix}1 & 3\\ 2 & 0\end{bmatrix},\quad B^{T}A^{T} = \begin{bmatrix} 0\cdot 1 + 5\cdot 2 & 0\cdot 3 + 5\cdot 0\\ 4\cdot 1 + (-1)\cdot 2 & 4\cdot 3 + (-1)\cdot 0 \end{bmatrix} = \begin{bmatrix}10 & 0\\ 2 & 12\end{bmatrix}. \]

Logo, \((AB)^{T} = B^{T}A^{T}\neq A^TB^T\).