BDU LaTeX Practical 6 : Aligned equations · all matrix types · cases environment

LaTeX Practical 6 – Blog Post

📘 LaTeX Practical 6

Aligned equations · all matrix types · cases environment
❓ Question 6: Write a LaTeX document that includes aligned equations, matrix representation, and cases environment using the amsmath package.

⌨️ LaTeX Source Code

\documentclass[12pt]{article} \usepackage{amsmath,amsymb} \title{Mathematical Expressions in \LaTeX} \author{ARO Study Circle} \date{\today} \begin{document} \maketitle \section{Aligned Equations} \[ \begin{align} x + y &= 10 \\ 2x + 3y &= 20 \\ x &= 10-y \end{align} \] \section{Matrix Representations} \subsection{matrix (no delimiters)} \[ \begin{matrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{matrix} \] \subsection{pmatrix (parentheses)} \[ \begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{pmatrix} \] \subsection{bmatrix (square brackets)} \[ \begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{bmatrix} \] \subsection{vmatrix (vertical bars)} \[ \begin{vmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{vmatrix} \] \subsection{Vmatrix (double vertical bars)} \[ \[ \begin{Vmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{Vmatrix} \] \] \section{Cases Environment} \[ f(x) = \begin{cases} x^2, & x \geq 0,\\ -x^2, & x < 0. \end{cases} \] \end{document}

📖 Explanation of Commands

  • amsmath package provides advanced mathematical environments.
  • align environment aligns multiple equations.
  • & symbol specifies the alignment point.
  • \\ command starts a new equation line.
  • matrix – no delimiters around the matrix.
  • pmatrix – parentheses ( ) around the matrix.
  • bmatrix – square brackets [ ] around the matrix.
  • vmatrix – vertical bars | | around the matrix.
  • Vmatrix – double vertical bars || || around the matrix.
  • cases environment creates a piecewise function.

📄 Compiled PDF Output

Mathematical Expressions in LaTeX
ARO Study Circle
August 21, 2026
1 Aligned Equations
x + y = 10
2x + 3y = 20
x = 10 − y
2 Matrix Representations
2.1 matrix (no delimiters)
\[ \begin{matrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{matrix} \]
2.2 pmatrix (parentheses)
\[ \begin{pmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{pmatrix} \]
2.3 bmatrix (square brackets)
\[ \begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{bmatrix} \]
2.4 vmatrix (vertical bars)
\[ \begin{vmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{vmatrix} \]
2.5 Vmatrix (double vertical bars)
\[ \begin{Vmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{Vmatrix} \]
3 Cases Environment
\[ f(x) = \begin{cases} x^2, & x \geq 0,\\ -x^2, & x < 0. \end{cases} \]

Post a Comment

0 Comments