LaTeX matrix generator

Fill in a grid, pick the brackets and copy clean LaTeX for your matrix, with a live preview. Paste cells from a spreadsheet to start faster.

Runs on your device · Free, no sign-up · Save to your Google Drive

Your LaTeX

LaTeX matrix generator

How to write a matrix in LaTeX

  1. Choose the number of rows and columns, then fill in the cells.
  2. Pick the brackets and how to wrap the matrix.
  3. Copy the LaTeX into your document.

Every kind of bracket

Round brackets (pmatrix), square (bmatrix), curly (Bmatrix), determinant bars (vmatrix), norms (Vmatrix) or none, as defined by the amsmath package.

Math in every cell

Cells can hold any LaTeX math, such as \alpha, x^2 or \frac{1}{2}. Empty cells become 0, and the identity button fills in an identity matrix.

LaTeX matrix generator: questions and answers

Which package do I need?

amsmath, which almost every LaTeX document already loads with \usepackage{amsmath}.

Can I paste from Excel or Google Sheets?

Yes. Copy the cells and use Paste a table: the grid fills in from the rows and columns you copied.

Is anything uploaded?

No. The matrix is built in your browser.