Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to type a matrix [x y] with a blank between the x and y. But in mathmode it will shrink the black between x and y. What is the easiest resolution around this?

share|improve this question
add comment

1 Answer

Add an empty column:

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
\left[
  \begin{array}{ccc}
    x & & y \\
  \end{array}
\right]
\]
\end{document}

enter image description here

As suggested in comments bmatrix with various spaces:

\documentclass{article}
\usepackage{mathtools}
\begin{document}
\[
  \begin{bmatrix}
    x & & y \\
  \end{bmatrix}
\]
\[
  \begin{bmatrix}
    x\, & \,y \\
  \end{bmatrix}
\]
\[
  \begin{bmatrix}
    x & y \\
  \end{bmatrix}
\]
\end{document}

enter image description here

share|improve this answer
5  
I'd also suggest just using x & y , which yields the correct spacing, or using the bmatrix environment. –  Peter Grill Jan 14 '13 at 0:37
2  
Rather than use the array environment, which features rather profligate spacing (in my opinion) between array elements and between the first and last array elements and the surrounding "fences" (whether square brackets or round parentheses), I'd recommend using environments such as bmatrix (for "matrix with brackets") and pmatrix ("matrix with parentheses"). E.g., $\begin{bmatrix} x & y \end{bmatrix}$ might do the job. –  Mico Jan 14 '13 at 0:41
    
@PeterGrill: thanks for this nice and elegant solution! –  minimax Jan 14 '13 at 0:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.