GeneralUsing split within a matrix environment

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
RhysU
Posts: 3
Joined: Fri Dec 19, 2008 4:26 am

Using split within a matrix environment

Post by RhysU »

Hello,

Does anyone know how to have split behave nicely within a bmatrix/array/matrix environment?

I have a long entry in an N x 1 matrix environment. The long entry needs to be split across multiple lines to keep my matrix on the page. Specifically, I'm trying to use split to break a long line within a bmatrix environment. My problem is that using the split environment drastically increases the whitespace/width of the matrix.

Check out the behavior of the matrix example (below) when split is used inside bmatrix.

Any help appreciated,
Rhys

P.S. -- The usual solution to large-stuff-in-an-array problem, reducing the font size (http://www.latex-community.org/viewtopi ... trix#p4370), is something I'd like to avoid.

Code: Select all

\documentclass[letterpaper,11pt]{amsart}
\usepackage{fullpage}
\pagestyle{plain}

\begin{document}

\begin{align*}
  \begin{bmatrix}
    00 + 01 + 02 + 03 + 04 + 05 + 06 + 07 + 08 + 09
    \\
    10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19
    \\
    20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29
    \\
    30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39
  \end{bmatrix}
\end{align*}

\begin{align*}
  \begin{bmatrix}
    00 + 01 + 02 + 03 + 04 + 05 + 06 + 07 + 08 + 09
    \\
    \begin{split}
         10 + 11 + 12 + 13 + 14 + 15 &+ 16 + 17 + 18 + 19
         \\
                                                  &+ 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29
    \end{split}
    \\
    30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39
  \end{bmatrix}
\end{align*}

\end{document}
test.pdf
(10.28 KiB) Downloaded 1014 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Using split within a matrix environment

Post by phi »

You could use aligned instead of bmatrix:

Code: Select all

  \left[\begin{aligned}
    00 + 01 + 02 + 03 + 04 + 05 &+ 06 + 07 + 08 + 09
    \\
         10 + 11 + 12 + 13 + 14 + 15 &+ 16 + 17 + 18 + 19
         \\
                                                  &+ 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29
    \\
    30 + 31 + 32 + 33 + 34 + 35 &+ 36 + 37 + 38 + 39
  \end{aligned}\right]
RhysU
Posts: 3
Joined: Fri Dec 19, 2008 4:26 am

Re: Using split within a matrix environment

Post by RhysU »

That works very well.

Thank you for the help,
Rhys
RhysU
Posts: 3
Joined: Fri Dec 19, 2008 4:26 am

Using split within a matrix environment

Post by RhysU »

From looking at your sample, I realized that I'd forgotten to try alignment markers in my bmatrix environment. I also get nice results using

Code: Select all

\begin{align*}
  \begin{bmatrix}
    &00 + 01 + 02 + 03 + 04 + 05
    \\
    \Big(
    \begin{split}
         10 &+ 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19
         \\
       &+ 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29
    \end{split}
    \Big)
    \\
    &30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39
  \end{bmatrix}
\end{align*}
No luck on using a paired \left( \right) combo outside the split though.

Thanks again,
Rhys
Post Reply