# multline

Used for long equations that span multiple lines, typically with the first line left-justified, the last line right-justified, and middle lines centered.

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

## Metadata

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

## Syntax

### ams

Argument specification: ``

Used for long equations that span multiple lines, typically with the first line left-justified, the last line right-justified, and middle lines centered.

## Common tasks

### How to break a long equation across lines

First line flush left, last line flush right; no & alignment.

```latex
\begin{multline} a+b+c+d \\ +e+f+g \end{multline}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Bmultline%7D+a%2Bb%2Bc%2Bd+%5C%5C+%2Be%2Bf%2Bg+%5Cend%7Bmultline%7D)

### How to split a long expansion

```latex
\begin{multline} (1+x)^n = 1+nx \\ +\frac{n(n-1)}{2}x^2+\cdots \end{multline}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Bmultline%7D+%281%2Bx%29%5En+%3D+1%2Bnx+%5C%5C+%2B%5Cfrac%7Bn%28n-1%29%7D%7B2%7Dx%5E2%2B%5Ccdots+%5Cend%7Bmultline%7D)

## Examples

```latex
\begin{multline} a+b \end{multline}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Bmultline%7D+a%2Bb+%5Cend%7Bmultline%7D)

## Renderer support

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

## Usage frequency

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

## In TeXForm

TeXForm reads the environment body in math mode.

## See also

- [multline*](https://texform.dev/latex/environments/multline-star)

## Test cases

### ams

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