LateX pmatrix, bmatrix, vmatrix, Vmatrix
The matrix environment provides no brackets or delimiters around the matrix. However, LaTeX provides various environments for creating matrices with different types of brackets or delimiters. Here are some examples:
1. pmatrix
This creates a matrix with parentheses.
Example:
\begin{pmatrix} % Start of the pmatrix environment 1 & 2 \\ % First row of the matrix, separated by ampersands (&) 3 & 4 % Second row of the matrix \end{pmatrix} % End of the pmatrix environment
Output:
*** QuickLaTeX cannot compile formula: \begin{pmatrix} % Start of the pmatrix environment 1 & 2 \\ % First row of the matrix, separated by ampersands (&) 3 & 4 % Second row of the matrix \end{pmatrix} % End of the pmatrix environment *** Error message: \begin{pmatrix} on input line 8 ended by \end{document}. leading text: \end{document} Improper \prevdepth. leading text: \end{document} Missing $ inserted. leading text: \end{document} Missing } inserted. leading text: \end{document} Missing \cr inserted. leading text: \end{document} Missing $ inserted. leading text: \end{document} You can't use `\end' in internal vertical mode. leading text: \end{document} \begin{pmatrix} on input line 8 ended by \end{document}. leading text: \end{document} Missing } inserted. leading text: \end{document} Missing \right. inserted. leading text: \end{document} Emergency stop.
2. bmatrix
This creates a matrix with brackets.
Example:
\begin{bmatrix} % Start of the bmatrix environment 1 & 2 \\ % First row of the matrix, separated by ampersands (&) 3 & 4 % Second row of the matrix \end{bmatrix} % End of the bmatrix environment
Output:
*** QuickLaTeX cannot compile formula: \begin{bmatrix} % Start of the bmatrix environment 1 & 2 \\ % First row of the matrix, separated by ampersands (&) 3 & 4 % Second row of the matrix \end{bmatrix} % End of the bmatrix environment *** Error message: \begin{bmatrix} on input line 8 ended by \end{document}. leading text: \end{document} Improper \prevdepth. leading text: \end{document} Missing $ inserted. leading text: \end{document} Missing } inserted. leading text: \end{document} Missing \cr inserted. leading text: \end{document} Missing $ inserted. leading text: \end{document} You can't use `\end' in internal vertical mode. leading text: \end{document} \begin{bmatrix} on input line 8 ended by \end{document}. leading text: \end{document} Missing } inserted. leading text: \end{document} Missing \right. inserted. leading text: \end{document} Emergency stop.
3. vmatrix
This creates a matrix with vertical bars.
Example:
\begin{vmatrix} % Start of the vmatrix environment 1 & 2 \\ % First row of the matrix, separated by ampersands (&) 3 & 4 % Second row of the matrix \end{vmatrix} % End of the vmatrix environment
Output:
*** QuickLaTeX cannot compile formula: \begin{vmatrix} % Start of the vmatrix environment 1 & 2 \\ % First row of the matrix, separated by ampersands (&) 3 & 4 % Second row of the matrix \end{vmatrix} % End of the vmatrix environment *** Error message: \begin{vmatrix} on input line 8 ended by \end{document}. leading text: \end{document} Improper \prevdepth. leading text: \end{document} Missing $ inserted. leading text: \end{document} Missing } inserted. leading text: \end{document} Missing \cr inserted. leading text: \end{document} Missing $ inserted. leading text: \end{document} You can't use `\end' in internal vertical mode. leading text: \end{document} \begin{vmatrix} on input line 8 ended by \end{document}. leading text: \end{document} Missing } inserted. leading text: \end{document} Missing \right. inserted. leading text: \end{document} Emergency stop.
4. Vmatrix
This creates a matrix with double vertical bars.
Example:
\begin{Vmatrix} % Start of the Vmatrix environment 1 & 2 \\ % First row of the matrix, separated by ampersands (&) 3 & 4 % Second row of the matrix \end{Vmatrix} % End of the Vmatrix environment
Output:
*** QuickLaTeX cannot compile formula: \begin{Vmatrix} % Start of the Vmatrix environment 1 & 2 \\ % First row of the matrix, separated by ampersands (&) 3 & 4 % Second row of the matrix \end{Vmatrix} % End of the Vmatrix environment *** Error message: \begin{Vmatrix} on input line 8 ended by \end{document}. leading text: \end{document} Improper \prevdepth. leading text: \end{document} Missing $ inserted. leading text: \end{document} Missing } inserted. leading text: \end{document} Missing \cr inserted. leading text: \end{document} Missing $ inserted. leading text: \end{document} You can't use `\end' in internal vertical mode. leading text: \end{document} \begin{Vmatrix} on input line 8 ended by \end{document}. leading text: \end{document} Missing } inserted. leading text: \end{document} Missing \right. inserted. leading text: \end{document} Emergency stop.
matrices in LaTeX
Matrices are an essential tool in mathematics and science for organizing and manipulating data. LaTeX provides a powerful set of tools for creating matrices that can be customized to fit your specific needs. In this article, we will explore how to create matrices in LaTeX and some of the formatting options available.