LaTeX

Symbols

Note the difference between

  • \(v\quad\) v

  • \(\nu\quad\) \nu

  • \(\upsilon\quad\) \upsilon

Greeks, arrows, symbols, see here.

Alignment

In short, odd-indexed & are used before = to align them, and even-indexed & are necessary to separate the columns.

  • 1 column, with 1 & in each line before =.

    \begin{align}
      x^2  + y^2 & = 1                       \\
      x          & = \sqrt{1-y^2}
    \end{align}
    
    \[\begin{split} \begin{align} x^2 + y^2 & = 1 \\ x & = \sqrt{1-y^2} \end{align} \end{split}\]
  • 2 columns of equations, with 3 & in each line: 2 before = and 1 in-between columns.

    \begin{align}    \text{Compare}
      x^2 + y^2 &= 1              &    x^3 + y^3 &= 1               \\
      x         &= \sqrt{1-y^2}   &            x &= \sqrt[3]{1-y^3}
    \end{align}
    
    \[\begin{split} \begin{align} \text{Compare} x^2 + y^2 &= 1 & x^3 + y^3 &= 1 \\ x &= \sqrt{1-y^2} & x &= \sqrt[3]{1-y^3} \end{align} \end{split}\]
  • 1 column of equation and 1 column of text, use &&.

    \begin{align}
      x      &= y      && \text{by hypothesis} \\
          x' &= y'     && \text{by definition} \\
      x + x' &= y + y' && \text{by Axiom 1}
    \end{align}
    
    \[\begin{split} \begin{align} x &= y && \text{by hypothesis} \\ x' &= y' && \text{by definition} \\ x + x' &= y + y' && \text{by Axiom 1} \end{align} \end{split}\]
  • 3 columns of equations, 5 & in each line: 3 before = and 2 in-between columns.

    \begin{align}
        x    &= y      &     X  &= Y      &   a  &= b+c      \\
        x'   &= y'     &     X' &= Y'     &   a' &= b        \\
      x + x' &= y + y' & X + X' &= Y + Y' &  a'b &= c'b
    \end{align}
    
    \[\begin{split} \begin{align} x &= y & X &= Y & a &= b+c \\ x' &= y' & X' &= Y' & a' &= b \\ x + x' &= y + y' & X + X' &= Y + Y' & a'b &= c'b \end{align} \end{split}\]
  • 2 columns, but different number of rows

    \begin{equation}
      \begin{aligned}
        x^2 + y^2  &= 1                 \\
        x          &= \sqrt{1-y^2}      \\
       \text{and also }y &= \sqrt{1-x^2}
      \end{aligned}               
    \qquad
      \begin{aligned}
       (a + b)^2 &= a^2 + 2ab + b^2       \\
       (a + b) \cdot (a - b) &= a^2 - b^2
      \end{aligned}      
    \end{equation}
    
    \[\begin{split} \begin{equation} \begin{aligned} x^2 + y^2 &= 1 \\ x &= \sqrt{1-y^2} \\ \text{and also }y &= \sqrt{1-x^2} \end{aligned} \qquad \begin{aligned} (a + b)^2 &= a^2 + 2ab + b^2 \\ (a + b) \cdot (a - b) &= a^2 - b^2 \end{aligned} \end{equation} \end{split}\]
  • Similar example as above, with [b] (move upward) and [t] (move downward)

    \begin{equation}
    \begin{aligned}[b]
      x^2 + y^2  &= 1                 \\
      x          &= \sqrt{1-y^2}      \\
     \text{and also }y &= \sqrt{1-x^2}
    \end{aligned}               \qquad
    \begin{gathered}[t]
     (a + b)^2 = a^2 + 2ab + b^2      \\
     (a + b) \cdot (a - b) = a^2 - b^2
    \end{gathered}
    \end{equation}
    
    \[\begin{split} \begin{equation} \begin{aligned}[b] x^2 + y^2 &= 1 \\ x &= \sqrt{1-y^2} \\ \text{and also }y &= \sqrt{1-x^2} \end{aligned} \qquad \begin{gathered}[t] (a + b)^2 = a^2 + 2ab + b^2 \\ (a + b) \cdot (a - b) = a^2 - b^2 \end{gathered} \end{equation} \end{split}\]