Matriz é um assunto interessante por si, o assunto fica ainda mais interessante quando vemos suas aplicações.
Neste exemplo exploraremos algumas das ferramentas que o LaTeX nos dar para trabalharmos com matrizes.
Algumas possibilidades e que serão tratadas nesse exemplo:
-
matriz simples 2 x 2
-
matriz longa
-
matriz dentro de outra matriz
\documentclass[a4paper, 10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[brazil]{babel}
\usepackage{amsmath}
\begin{document}
\section{Matriz simples}
Como um primeiro exemplo de matriz bem simples faremos uma matriz do tipo $ A = 2 \times 2 $.
\begin{displaymath}
\mathbf{A}=\left(\begin{array}{cc}
a & b\\
c & d
\end{array}\right)
\end{displaymath}
\section{Matriz longa}
\begin{displaymath}
\mathbf{B}=\left(\begin{array}{cccccccccccccccccc}
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1&1\\
\end{array}\right)
\end{displaymath}
\section{Usando os pacote \emph{pmatrix}, \emph{bmatrix}, \emph{Bmatrix}, \emph{vmatrix}, \emph{Vmatrix}}
\subsection{pmatrix}
O pacote \emph{pmatrix} gera uma matriz entre parênteses ().
\begin{displaymath}
\begin{pmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{pmatrix}
\end{displaymath}
\subsection{bmatrix}
O pacote \emph{bmatrix} gera uma matriz entre colchetes [].
\begin{displaymath}
\begin{bmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{bmatrix}
\end{displaymath}
\subsection{Bmatrix}
O pacote \emph{Bmatrix} gera uma matriz entre chaves $\lbrace \rbrace$.
\begin{displaymath}
\begin{Bmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{Bmatrix}
\end{displaymath}
\subsection{vmatrix}
O pacote \emph{vmatrix} gera uma matriz entre retas verticais $\arrowvert \arrowvert$.
\begin{displaymath}
\begin{vmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{vmatrix}
\end{displaymath}
\subsection{Vmatrix}
O pacote \emph{Vmatrix} gera uma matriz entre retas duplas $ \| \|$.
\begin{displaymath}
\begin{Vmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{Vmatrix}
\end{displaymath}
\section{Matrizes mais longas }
Para matrizes mais longas usamos os comandos \emph{ldots, vdots e ddots} que representam respectivamente reticências na horizontal, vertical e na diagonal.
\begin{displaymath}
\begin{pmatrix}
x_{11}&x_{12}&x_{13}& \ldots & x_{1k}& \ldots & x_{1n}\\
x_{21}&x_{22}&x_{23}& \ldots & x_{2k} & \ldots& x_{2n}\\
x_{31}&x_{32}&x_{33}& \ldots & x_{3k} & \ldots& x_{3n}\\
\vdots & \vdots & \vdots & \ddots & \vdots & \ddots & \vdots\\
x_{k1} & x_{k2} & x_{k3} &\ldots & x_{kk} & \ldots & x_{kn}\\
\vdots & \vdots & \vdots & \ddots & \vdots & \ddots & \vdots\\
x_{n1}&x_{n2}&x_{n3}& \ldots & x_{nk}& \ldots & x_{nn}\\
\end{pmatrix}
\end{displaymath}
\subsection{Matriz dentro de outra matriz.}
\begin{displaymath}
\left[
\begin{array}{c@{}c@{}c@{}c}
\left[\begin{array}{ccc}
\alpha & \beta & \gamma \\
\delta & \epsilon & \zeta \\
\eta & \theta & \iota
\end{array}\right] & \mathbf{0} & \mathbf{0} & \mathbf{0} \\
\mathbf{0} & \left[\begin{array}{ccc}
b_{11} & b_{12} & b_{13}\\
b_{21} & b_{} & b_{23}\\
b_{31} & b_{32} & b_{33}\\\
\end{array}\right] & \mathbf{0} & \mathbf{0} \\
\mathbf{0} & \mathbf{0} & \left[ \begin{array}{ccc}
c_{11} & c_{12} & c_{13} \\
c_{21} & c_{22} & c_{23} \\
c_{31} & c_{32} & c_{33} \\
\end{array}\right] & \mathbf{0} \\
\mathbf{0} & \mathbf{0} & \mathbf{0} & \left[ \begin{array}{ccc}
\kappa & \lambda & \mu \\
\nu & \xi & \pi \\
\rho & \sigma & \psi \\
\end{array}\right] \\
\end{array}\right]
\end{displaymath}
\end{document}