# align

Displayed multi-line derivations and systems with alignment points, usually at relation signs.

https://texform.dev/latex/environments/align

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Alignment](https://texform.dev/latex/topics/alignment) |
| Packages | ams |
| Allowed mode | math |
| Tags | math-alignment |
| Commonality | high |
| Body mode | math |

## Syntax

### ams

Argument specification: ``

Displayed multi-line derivations and systems with alignment points, usually at relation signs.

## Common tasks

### How to align a multi-line derivation on equals

```latex
\begin{align} a &= b + c \\ &= d \end{align}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Balign%7D+a+%26%3D+b+%2B+c+%5C%5C+%26%3D+d+%5Cend%7Balign%7D)

### How to align several equations at once

```latex
\begin{align} x &= a+b \\ y &= c+d \end{align}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Balign%7D+x+%26%3D+a%2Bb+%5C%5C+y+%26%3D+c%2Bd+%5Cend%7Balign%7D)

### How to align two columns of equations

Each extra alignment point needs a pair of & columns.

```latex
\begin{align} a &= b & c &= d \\ e &= f & g &= h \end{align}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Balign%7D+a+%26%3D+b+%26+c+%26%3D+d+%5C%5C+e+%26%3D+f+%26+g+%26%3D+h+%5Cend%7Balign%7D)

## Examples

```latex
\begin{align} a &= b \end{align}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Balign%7D+a+%26%3D+b+%5Cend%7Balign%7D)

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| ams | full | none | full |

## Usage frequency

10.14% of formulas in the measured corpus contain this entry, rank 2 of 31 entries with frequency data.

## In TeXForm

TeXForm reads the environment body in math mode.

## See also

- [align*](https://texform.dev/latex/environments/align-star)
- [eqnarray](https://texform.dev/latex/environments/eqnarray)
- [eqnarray*](https://texform.dev/latex/environments/eqnarray-star)
- [gather](https://texform.dev/latex/environments/gather)
- [gather*](https://texform.dev/latex/environments/gather-star)
- [split](https://texform.dev/latex/environments/split)

## Test cases

### ams

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \begin{align} a & b \end{align} | Positive: baseline | Pass | Fail | Pass |
