Math & ScienceColumn Vector in Array too wide

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
FliegenderZirkus
Posts: 4
Joined: Thu Oct 11, 2012 5:12 pm

Column Vector in Array too wide

Post by FliegenderZirkus »

Hello community,

I am trying to obtain a column vector with left aligned elements.

Code: Select all

\left\{\begin{array}{l}
x_{abc}\\
y_d
\end{array}\right\}

\begin{Bmatrix}
  x_{abc}\\
  y_d
\end{Bmatrix}
I would like to either
  1. get rid of the white space in the {array} solution or
  2. left align the Bmatrix solution.
Any ideas how to do any of the two?

Thanks!
Attachments
array_vs_Bmatrix.png
array_vs_Bmatrix.png (2.59 KiB) Viewed 7711 times
Last edited by localghost on Wed Jun 05, 2013 11:37 am, edited 1 time in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Column Vector in Array too wide

Post by localghost »

In an {array} environment there is a separating space between columns that is determined by the length \arraycolsep (default value 5pt). This applies also to the position before the first column and after the last one (which is the same here). You can get rid of it by adding @{} at the corresponding positions in the {array} preamble to remove that gap.

Code: Select all

\left\{
\begin{array}{@{}l@{}}
  x_{abc}\\
  y_d
\end{array}
\right\}
For a solution with the matrix environment from amsmath see the blog entry »Matrices with alignment« by our administrator.


Best regards and welcome to the board
Thorsten
FliegenderZirkus
Posts: 4
Joined: Thu Oct 11, 2012 5:12 pm

Re: Column Vector in Array too wide

Post by FliegenderZirkus »

I see, both solutions offer just what I need, thank you. Next time I'll try to look for existing answers better!
Post Reply