3

I have been trying to express my matrices in a clear way. The problem I have is that the symbolic terms inside the matrices are sometime large and this kind of disturbs the matrix look of the matrix. I mean

\begin{pmatrix}
x & y
\end{pmatrix}

looks like how a matrix should. But if you have an expression there, like

\begin{pmatrix}
x + y cos(\theta) & y + x sin(\theta)
\end{pmatrix}

the matrix resembles less like a 2X1 matrix and more like two terms with a little space in between and surrounded by brackets. Is there a better command that makes matrices with reasonably large terms appear 'normal'. I can imagine my question maybe a bit unclear.

Edit: Maybe a better font for math dominated text would be better for representation? Suggestions?

Zero
  • 165
  • bmatrix with | in the middle ? Inline matrices are always strange to read anyways – percusse Nov 20 '16 at 20:22
  • I like pmatrix in general...and it would be hard for me to change the expression everywhere now...anyways what do you mean with | in the middle? Can you give me the syntax to try out? – Zero Nov 20 '16 at 20:23
  • (\begin{array}{c|c} .... \end{array}) – percusse Nov 20 '16 at 20:24
  • hahaha...its actually a | in the middle :D...sorry but it looks a bit weird in midst of all these equations ;) – Zero Nov 20 '16 at 20:28
  • well better than double parentheses for me – percusse Nov 20 '16 at 20:32
  • Well it would be trivially easy to add a little bit more space between them if that's the issue \begin{pmatrix} x + y cos(\theta) & & y + x sin(\theta) \end{pmatrix} but I would think it should be obvious from the context what's going on. x x 1 matrices -- especially 2 x 1 matrices, always looked a bit weird to me. – Au101 Nov 20 '16 at 20:35
  • Or you could switch out pmatrix for bmatrix. Matrices with square brackets always looked a bit more matrix-y to me, maybe because I'm used to them, but given the usual order of brackets is {[( ... )]} a 2 x 1 matrix with square brackets might look more like a matrix and less immediately like something in parentheses – Au101 Nov 20 '16 at 20:36
  • 2
    Oh and \sin and \cos is an absolute must – Au101 Nov 20 '16 at 20:38
  • @Au101 thanks for /sin /cos thing...funny I didn't know...and you are right about x x 1 matrrices...I would switch to bmatrix if I can't find any other solution, even though it would a cumbersome task for me – Zero Nov 20 '16 at 20:43
  • 1
    @Zero \sin sir/madam, not /sin. Shouldn't be very difficult, find and replace. replace \begin{pmatrix} with \begin{bmatrix}. Same for \end – Au101 Nov 20 '16 at 20:44
  • @Au101 I feel stupid now...anyways do you have a better font for a thesis with a lot of mathematical expressions? – Zero Nov 20 '16 at 20:45
  • @Zero No need to feel stupid. Better to ask new questions as new questions, rather than in the comments, but I think font requests would probably not be considered on-topic as it's really a matter of opinion, but personally I would be very unlikely to turn my back on my beloved Computer Modern (the default). Maybe you might like this Q&A http://tex.stackexchange.com/questions/9533/what-best-combination-of-fonts-for-serif-sans-and-mono-do-you-recommend – Au101 Nov 20 '16 at 20:49
  • @Au101 thanks...I really do not like how the bmatrix looks...maybe I would experiment with the fonts...thanks a lot :) – Zero Nov 20 '16 at 20:54
  • @Zero - If you're thinking about using a font family other than Computer Modern, you may want to take a look at the posting Suggest a “nice” font family for my basic LaTeX template (text and math). – Mico Nov 20 '16 at 20:57

1 Answers1

3

I see nothing wrong with the usual typesetting: the large space between entries is sufficient. I probably would use bmatrix anyway.

You can see whether the following trick is what you need: we reduce the space around binary operation symbols.

\documentclass{article}
\usepackage{amsmath}

\newsavebox{\rpmatrixbox}
\newenvironment{rpmatrix}
 {\begin{lrbox}{\rpmatrixbox}
  \setlength{\medmuskip}{.5\medmuskip}%
  $\begin{pmatrix}}
 {\end{pmatrix}$\end{lrbox}\usebox\rpmatrixbox}

\begin{document}

$\begin{pmatrix} x+y\cos(\theta) & y+x\sin(\theta)\end{pmatrix}$

\medskip

$\begin{rpmatrix} x+y\cos(\theta) & y+x\sin(\theta)\end{rpmatrix}$

\end{document}

enter image description here

egreg
  • 1,121,712
  • 1
    +1. I'd be tempted to omit the parentheses around \theta, i.e., I'd write \cos\theta and \sin\theta. That way, there are no parentheses in the interior of the pmatrix environments to compete visually with the parentheses that enclose the environments. – Mico Nov 20 '16 at 21:11
  • 1
    @Mico I too prefer not having them if the argument is a variable or of the form “number times variable”. – egreg Nov 20 '16 at 21:34