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 column vector like below:

     [  dx     ]
UI = [  dy     ]
     [  dtheta ]

U is the name of this vector, and I is the subscript. Two brackets like the matrix style. dx, dy and dtheta are actually three items with a dot on their head, and theta is a Greek letter.

share|improve this question
1  
For dx, dy and dtheta, you could use \dot{x}, \dot{y} and \dot{\theta}. –  Werner Sep 6 '12 at 14:01
    
If I also want a number of this equation like Ui= [x \\ y \\ theta] (4) (4) is behind the expression indicating its NO. How can I do this? Thanks in advanced. –  user18441 Sep 6 '12 at 14:04
    
Instead of \[...\] use \begin{equation}...\end{equation}. –  Gonzalo Medina Sep 6 '12 at 14:19
add comment

2 Answers 2

Is this what you're after?

\( U_i = \left[ \dot{dx}, \dot{dy}, \dot{d \theta} \right] \)

Well, you can replace the \[,\] with any other brace of your taste, e.g. \left(,\right) or \left\{,\right\}. In addition, instead of dx you can have something like \mathrm{d}x to have something similar to derivative.

In addition, if you wish you wish to have column vector, refer to this question and the answers following it.

Edit:

If you want to have a numbered version of the expression, put the expression between the \(, and \), that is what in the math-mode, inside an equation environment.

share|improve this answer
1  
Probably \left[ and \right], not with the additional backslash; but \left and \right are redundant and possibly wrong. –  egreg Sep 6 '12 at 13:33
    
@egreg my bad. I corrected the code –  Dror Sep 6 '12 at 13:36
    
Thanks Dror and Egreg –  user18441 Sep 6 '12 at 13:45
    
@Dror I would remove the \left and \right: it's a bad habit to always add them. In this particular case the output is worse than it would have been without them, just try and look closely at the spacing. –  egreg Sep 6 '12 at 13:53
    
If I also want a number of this equation like Ui= [x \\ y \\ theta] (4) (4) is behind the expression indicating its NO. How can I do this? Thanks in advanced. –  user18441 Sep 6 '12 at 14:04
add comment

You can use an array to create a vector. See section 3 of the Not so Short Guide to LaTeX for more details.

\documentclass{article}
\begin{document}
\[
\mathbf{U}_I =
\left[
\begin{array}{c}
\mathrm{d}x \\
\mathrm{d}y \\
\mathrm{d}\theta
\end{array}
\right]
\]
\end{document}

The spacing around between the elements and the brackets can be reduced by replacing {c} with {@{}c@{}}. You could also consider using the bmatrix environment from the amsmath package. Note that \[ and \] create an equation that is not numbered. If you need a numbered equation you should use \begin{equation} and \end{equation} instead.

share|improve this answer
    
If I also want a number of this equation like Ui= [x \\ y \\ theta] (4) (4) is behind the expression indicating its NO. How can I do this? Thanks in advanced. –  user18441 Sep 6 '12 at 13:54
    
Possibly \begin{array}{@{}c@{}}? –  egreg Sep 6 '12 at 13:54
    
@user18441 --- I have edited my answer. –  Ian Thompson Sep 6 '12 at 14:05
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.