How to write a matrix in Word
Insert a matrix in Word from the gallery or by typing, add rows and columns, add brackets, and convert LaTeX matrices for many at once.
Written for Word for Microsoft 365 on Windows. Also fits Word 2019 and 2021. · Updated 2026-11-25
Open in converter with an exampleA matrix in Word is a grid of boxes inside an equation. You can make one from a gallery, or type it as text and let Word build it. This guide shows both, then a faster way to convert many matrices you have in LaTeX.
Steps are for Word for Microsoft 365 on Windows and also apply to Word 2019 and 2021. On a Mac, the shortcut to start an equation is Control+=.
Method 1: the matrix gallery
- Click where the matrix should go.
- Press
Alt+=to start an equation. - On the Equation tab, in the Structures group, press Matrix.
- Choose a size from the grid, such as 2 by 2 or 3 by 3. Some choices already have round or square brackets, and others are determinants with vertical bars.
- Click the first empty box and type. Press the right arrow key to move to the next box.
The gallery is the easiest way to start, and you can see the form before you pick.
Add or remove rows and columns
- Right-click inside the matrix.
- Choose Matrix Alignment, Insert, or Delete from the menu.
- Under Insert, you can add a row or column before or after the one you clicked.
To make a matrix with the same entry everywhere, such as a zero matrix, type the first row and copy the boxes.
Add brackets
A plain matrix has no brackets. Wrap it in brackets from the Bracket gallery: select the matrix, choose Bracket in the Structures group, and pick round, square, or vertical bars for a determinant. Another way is to choose a matrix from the gallery that already has the brackets.
Method 2: type it as text
This is quicker once you know the form.
- Press
Alt+=. - Type
(■(a&b@c&d)). To type the square symbol, enter\matrixand pressSpace, then continue. - Press
Spaceto build it.
In this form & separates the cells in a row and @ starts a new row. The outer brackets give you a matrix with round brackets. For square brackets, use [■(a&b@c&d)]. For a determinant, use |■(a&b@c&d)|.
If the symbol does not appear, the Math AutoCorrect rules may be off. Go to File, Options, Proofing, AutoCorrect Options, and check that Math AutoCorrect is on.
Method 3: LaTeX mode
If you write LaTeX, use LaTeX input.
- Press
Alt+=. - On the Equation tab, in the Conversions group, choose LaTeX.
- Type
\begin{pmatrix} a & b \\ c & d \end{pmatrix}. - Press
Space.
Recent versions of Word build this as a matrix. Support for each environment name differs by build. If yours does not accept it, use Method 2, which works in all versions that have the equation editor.
Method 4: convert many matrices at once
Say you have lecture notes or a chatbot answer with a dozen matrices written in LaTeX. Typing each one into Word takes a long time. The converter reads LaTeX matrices and writes native Word matrices.
It handles pmatrix (round brackets), bmatrix (square), vmatrix (vertical bars, for a determinant), and cases for systems of equations. Open the example with the button at the top. It has a 2 by 2 matrix with its determinant and a 3 by 3 identity matrix. Press Download Word and click one. It is an equation you can edit as in Method 1.
| By hand in Word | With the converter | |
|---|---|---|
| One matrix | Gallery or typing | Same, but slower |
| Twenty matrices | Repeat 20 times | Paste once |
| Tables around them | Retype | Pipe tables become Word tables |
| Result | Native Word equation | Native Word equation |
Typical matrices to know
| Matrix | LaTeX | Result |
|---|---|---|
| Round brackets | pmatrix |
( a b / c d ) |
| Square brackets | bmatrix |
[ a b / c d ] |
| Determinant | vmatrix |
vertical bars |
| System of equations | cases |
a large left brace |
Common problems
The cells are too close. Word spaces the columns by default. Right-click the matrix, open Matrix Spacing, and change the column spacing. The option may be named differently on your build.
The matrix looks small in a sentence. Inline equations are shrunk. Right-click the equation and choose Change to Display, or put it on its own line.
The ampersand is typed as a character. You typed it outside an equation. Start the equation with Alt+= first.
Rows end up in one line. You used a plain line break. In the text form, use @ between rows. In LaTeX mode, use two backslashes.
Matrices and tables
A grid of numbers is not always a matrix. A table of data should be a Word table, so you can add borders and sort it. A matrix is a math object: it keeps its brackets and aligns with the text baseline of the equation. In the converter, a table written with pipes becomes a table, and a matrix in LaTeX becomes a matrix. They are different on purpose.
Notes on Word versions
The matrix gallery has been in the equation editor since Word 2007. The ■ form and the @ row marker are UnicodeMath and work in all later versions. LaTeX input needs Word 2016 version 1707 or later, 2019, 2021 or Microsoft 365. These steps were written for one build of Microsoft 365, so use the search box at the top of Word if a menu item has another name.