Augmented Matrix in LaTeX

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

Augmented Matrix in LaTeX

Is it possible to create any of these sorts of structures in LaTeX? I imagine the one in the lower right is easiest.
Attachments
augmented matrix.png (10.05 KiB) Viewed 2567 times
Last edited by gfauxpas on Thu Apr 19, 2012 5:28 pm UTC, edited 1 time in total.
gfauxpas

Posts: 97
Joined: Sun Oct 09, 2011 11:24 pm UTC

Re: Augmented Matrix in LaTeX

\left[
\begin{array}{ccc}
1&2&9\\
3&\pi&6\\
\frac34&0&0
\end{array}
\right|
\left.
\begin{array}{ccc}
1&0&0\\
0&1&0\\
0&0&1
\end{array}
\right]

Not certain on making stuff on the right different sized, but the basic idea is to use \begin{array} instead of any of the matrix macros, and a \left( \right| followed by a \left. \right) (a '.' makes an empty delimiter because \left and \rights need to be matched)

edit: the multirow package should help with the others. http://ideasheaf.wordpress.com/2009/06/ ... ith-latex/
Last edited by mike-l on Thu Apr 19, 2012 2:40 pm UTC, edited 1 time in total.
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.
mike-l

Posts: 2626
Joined: Tue Sep 04, 2007 2:16 am UTC

Re: Augmented Matrix in LaTeX

This should also work for simpler cases. The latex support here gets is wrong though.

Code: Select all
\left(\begin{array}{ccc|ccc}  1 & 2 & 9 & 1 & 0 & 0\\  3 & \pi & 6 & 0 & 1 & 0 \\1/4 & 0 & 0 & 0 & 0 & 1\end{array}\right)

I'd expect the AMS math to have something better. Maybe look up its documentation?

Here's a case which shows how to get the sizes rightish.

\left[
\begin{array}{cc}
{\left.
\begin{array}{ccc}
1 & 2 & 9 \\
3 & \pi & 6 \\
1/4 & 0 & 0 1
\end{array}
\right|}
& I
\end{array}
\right]
Last edited by jestingrabbit on Thu Apr 19, 2012 2:44 pm UTC, edited 1 time in total.
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

jestingrabbit

Posts: 5397
Joined: Tue Nov 28, 2006 9:50 pm UTC
Location: Sydney

Re: Augmented Matrix in LaTeX

Thanks a lot. What's {ccc}, column column column?
gfauxpas

Posts: 97
Joined: Sun Oct 09, 2011 11:24 pm UTC

Re: Augmented Matrix in LaTeX

centre centre centre, it's the alignment for each column. l and r are also supported.
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.
mike-l

Posts: 2626
Joined: Tue Sep 04, 2007 2:16 am UTC

Re: Augmented Matrix in LaTeX

You can make diagonal matrices using the multirow package--something like this:
Code: Select all
\usepackage{multirow}% ...\newcommand{\ZZZZ}{\multicolumn{2}{c}{\multirow{2}{*}{\LARGE{$0$}}}}%\begin{pmatrix}1 &   & \ZZZZ \\  & 1 &   &   \\\ZZZZ & 1 &   \\  &   &   & 1\end{pmatrix}

eta oin shrdlu

Posts: 426
Joined: Sat Jan 19, 2008 4:25 am UTC