7

Here's a minimal example of what I'm doing presently:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{arydshln}
\makeatletter
    \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
      \hskip -\arraycolsep
      \let\@ifnextchar\new@ifnextchar
  \array{#1}}
\makeatother

\begin{document}
$\begin{pmatrix}[ccc:c]
  1&2&3&0 \\
  4&5&6&0 \\
  7&8&9&0 \\
\end{pmatrix}$
\end{document}

Here's what the output looks like:

Present output (parens)

I'd prefer if the left and right brackets on the matrix were square brackets instead of parentheses.

Is there an easy way to make such a change?

David Carlisle
  • 757,742
Harold
  • 1,549

1 Answers1

9

Easy. Change pmatrix to bmatrix:

enter image description here

See amsmath documentation for other kinds of matrices, like vmatrix, Vmatrix, etc

Werner
  • 603,163
Boris
  • 38,129