views:

2172

answers:

3

I'm trying to accomplish this in LaTeX:

⎡a⎤ ⎡b …  n⎤
⎢⁞⎢ ⎢⁞ ⋱ ⁞⎢
⎣x⎦ ⎣y …  z⎦

      [a  … x]

I'm able to get a vector + a matrix on one line, but I'm not sure how to align the vector below so that it sits perfectly under the large matrix.

Here's a less-unicode text representation of the 'drawing' above:

[a] [ b c ]
[d] [ e f ]
    [ g h ]

Note that the last line ([ g h ]) is a single-row matrix, separate from the 2x2 matrix above it.

+1  A: 

If all else fails, PGF/TikZ can do this. See this example.

las3rjock
+1  A: 

Wrap the thing in \begin{align*} ... \end{align*} and use & as the alignment marker in your formulas.

Example:

    \begin{align*}
        \begin{pmatrix} ... vector here \end{pmatrix}
        &\begin{pmatrix} ... first matrix here \end{pmatrix}\\
        &\begin{pmatrix} ... second matrix here \end{pmatrix}
    \end{align*}

laalto
can't check at the moment but I think this gives some errors.
bastijn
A: 

\edit2
final answer:

\begin{align*}
        \begin{vmatrix} 1 \\ 2 \end{vmatrix} &\begin{vmatrix} 1 & 2 & 3 \\ 3 & 4 & 5 \end{vmatrix} \\[6px]
        &\begin{vmatrix} 2 & 3 & 4 \end{vmatrix} 
\end{align*}

does exactly what you want, read below for more info about placement and such. The "&" sign is used to align in general. Forgot the first line had 2 matrices but now you have it :).

info on spacing and such
\begin{align*} &\begin{pmatrix} 1 & 2 & 3 \ 3 & 4 & 5 \end{pmatrix} \[6px] &\hspace{2px}\begin{pmatrix} 2 & 3 & 4 \end{pmatrix} \end{align*}

would do the job. For some strange reason the align gave errors when leaving out the first "&" symbol and it gave a 2px offset. I figured you wanted some space between the two if not leave the [6px]. You can always use \hspace{amount of whitespace} to place your second matrix in the place you want. This can be given in pt's, px's (which i did) etc.

//edit
Hm I notice the \hspace{} is actually not needed, but can be used in case of pmatrix. What happens is that the pmatrix brackets give a biased image of the matrices. When using vmatrix like:

\begin{align*}
        &\begin{vmatrix} 1 & 2 & 3 \\ 3 & 4 & 5 \end{vmatrix} \\[6px]
        &\begin{vmatrix} 2 & 3 & 4 \end{vmatrix} 
\end{align*}

It all goes well :). So basically, probably the easiest way to fix it is either use other brackets to make it look good or use the \hspace to align as you like it.

bastijn