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?

9

Easy. Change pmatrix to bmatrix:

enter image description here

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

  • Thanks @Boris! That works great! I really appreciate the help. – Harold Nov 21 '11 at 17:42
  • 1
    or look at mathmode.pdf (26.6 Matrix environments) with texdoc mathmode.pdf – Alain Matthes Nov 21 '11 at 17:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.