## LaTeX forum ⇒ General ⇒ Augmented pmatrix Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
Plato
Posts: 6
Joined: Wed Nov 19, 2014 7:08 pm

### Augmented pmatrix

Hello, I'm using TeXnicCenter, and I wish to have pmatrices in augmented form (with a vertical line).

I know how to get an augmented matrix with square brackets, by using the code
\left[\begin{array}{rrrrr|r}   -3 & 6 & -1 & 1 & -7 \\    1 & -2 & 2 & 3 & -1 \\    2 & -4 & 5 & 8 & -4\end{array}\right]

But I want augmented matrices with normal (round) parentheses. I tried using the code: \begin{pmatrix}[ccc|c] but it didn't work.
Last edited by Stefan Kottwitz on Sun Jan 04, 2015 1:44 pm, edited 2 times in total.
Reason: code marked

Tags:

Stefan Kottwitz
Posts: 8979
Joined: Mon Mar 10, 2008 9:44 pm
You could use \left( and \right) instead of \left[ and \right].

But there's a way to extend matrices, I posted it earlier here: Creating an Augmented matrix.

\documentclass{article}\usepackage{amsmath}\makeatletter\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%   \hskip -\arraycolsep   \let\@ifnextchar\new@ifnextchar   \array{#1}}\makeatother\begin{document}$\begin{pmatrix}[rrrr|r] -3 & 6 & -1 & 1 & -7 \\ 1 & -2 & 2 & 3 & -1 \\ 2 & -4 & 5 & 8 & -4 \end{pmatrix}$\end{document}

Stefan

Plato
Posts: 6
Joined: Wed Nov 19, 2014 7:08 pm

Stefan Kottwitz
Posts: 8979
Joined: Mon Mar 10, 2008 9:44 pm
Sure, I will take a look.

Stefan

### Who is online

Users browsing this forum: No registered users and 10 guests