Aligning equations
このページには最新のブラウザ(SharedArrayBuffer対応)が必要です。Chrome、Edge、Firefox、Safariを最新バージョンに更新してください。
English
Lining equations up
- When you show working, readers like the
=signs to line up. Thealign*environment does this:
\begin{align*}
y &= 2(x + 3) \\
y &= 2x + 6
\end{align*}
- The
&marks where to align (just before each=), and\\ends each line.

English
Numbered or not
align*(with the star) gives no equation numbers.- Drop the star —
align— and LaTeX numbers each line(1),(2), … for you to refer to.
English
Matrices
amsmathalso gives matrices.bmatrixdraws square brackets:
\[
\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}
\]
- Again
&separates columns and\\separates rows — the same idea as alignment.
English
Common mistakes
alignwithoutamsmath. LaTeX stops with! LaTeX Error: Environment align undefined.- A blank line inside
align. It gives! Paragraph ended before \align was complete.Keep the lines together;\\already starts a new row. - The
&in different places. Put it just before the symbol to line up, usually&=, on every line.
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Show the two steps lined up at the = sign. Put them in an align* environment, with & just before each = かつ \\ between the lines.
コンパイルしてPDFをプレビューするには「実行」をクリックしてください。
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Draw a 2×2 matrix with bmatrix (square brackets). Separate columns with & and rows with \\, e.g. \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}.
コンパイルしてPDFをプレビューするには「実行」をクリックしてください。
難易度 2/5 · 140 コイン + 今日初回達成時の小ボーナス
Solve $2x + 3 = 11$ in three lines inside align*, lined up at =: 2x + 3 &= 11, then 2x &= 8, then x &= 4. End the first two lines with \\.
コンパイルしてPDFをプレビューするには「実行」をクリックしてください。