# \hline

Used inside math array or matrix-style alignments to draw a solid horizontal rule at the top of the array or between rows.

https://texform.dev/latex/commands/hline

## Metadata

| Field | Value |
| --- | --- |
| Topic | [Layout and breaks](https://texform.dev/latex/topics/layout) |
| Packages | base |
| Allowed mode | math |
| Tags |  |
| Commonality | medium |
| Kind | prefix |

## Syntax

### base

Argument specification: ``

Used inside math array or matrix-style alignments to draw a solid horizontal rule at the top of the array or between rows.

## Examples

```latex
\begin{array}{c}\hline a\cr \hline b\end{array}
```

[Open in Playground](https://play.texform.dev/?input=%5Cbegin%7Barray%7D%7Bc%7D%5Chline+a%5Ccr+%5Chline+b%5Cend%7Barray%7D)

## Renderer support

| Package | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- |
| base | full | full | full |

## Usage frequency

0.10% of formulas in the measured corpus contain this entry, rank 111 of 263 entries with frequency data.

## In TeXForm

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

## See also

- [\\hdashline](https://texform.dev/latex/commands/hdashline)

## Test cases

### base

| Input | Case | MathJax | KaTeX | XeTeX |
| --- | --- | --- | --- | --- |
| \begin{array}{cc} \hline a & b \\ c & d \end{array} | Positive: ctx:in-array | Pass | Pass | Pass |
