Hello again from the LaTeX Math for Confluence (Cloud) team!
If you’ve been following our series, you already know how to write fractions, roots, summations, integrals, and add text to your equations.
Today’s focus: aligning multi-line equations. Often, math derivations or systems of equations span multiple lines. Aligned equations improve readability by lining up operators or equal signs.
The align environment lets you write several equations aligned on the & symbol:
\begin{align}
a &= b + c \\
d &= e - f
\end{align}
This renders two aligned equations with equal signs lined up.
Tips:
Always use double backslashes (\\) to break lines
Use & to align equations on equal signs or any other chosen symbol
Use \text{} to add words or comments inside math blocks
Example 1: Basic alignment on equals sign
\begin{align}
ax^2 + bx + c &= 0 \\
x &= \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
\end{align}
Example 2: Long equation split across lines
Useful for breaking up lengthy expressions:
\begin{align}
f(x) &= x^3 + 2x^2 - 5x \\
&\quad + \frac{1}{x} - 7
\end{align}
Example 3: Equation with explanatory text
You can add comments or explanations between lines using the \text{} command and & to align them:
\begin{align}
c &= \sqrt{a^2 + b^2} \\
&\text{Using Pythagoras theorem with } a = 3,\ b = 4 \\
&= \sqrt{3^2 + 4^2}= \sqrt{9 + 16} = \sqrt{25} = 5
\end{align}
Aligned equations are essential when working with derivations, formulas, and systems that span multiple lines. Using the align environment with & and \\ gives your math a clean, readable structure and helps colleagues follow each step without confusion.
If you're using Confluence Cloud, tools like LaTeX Math for Confluence make it easy to add nicely formatted formulas directly in your pages.
📌 Next up in our series: how to use and scale brackets, delimiters, and absolute values in LaTeX.