# column vector in math mode

I know, there are questions about how to write column vectors, but non of the answers uses math mode (i.e. coded between Dollar signs) to code a column vector.

I have this formula:

$$N_S \left( t \right) = \int_g^h \int_e^f \int_c^d \int_a^b f_x \left( q, t \right) dq_1 dq_2 dq_3 dq_4$$


which produces this output:

But I need this (written in Word, but I need to write it in LaTeX):

How can I write this in LaTeX?

Nothing difficult, but I'd use a different style:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

$N_S(t) = \int_g^h \int_e^f \int_c^d \int_a^b f_x \left(\begin{pmatrix}q_1\\q_2\\q_3\\q_4\end{pmatrix}, t \right)\,dq_1\,dq_2\,dq_3\,dq_4$

$N_S(t) = \int_g^h \int_e^f \int_c^d \int_a^b f_x(\mathbf{q}, t)\,dq_1\,dq_2\,dq_3\,dq_4, \qquad \mathbf{q}=\begin{pmatrix}q_1\\q_2\\q_3\\q_4\end{pmatrix}$

\end{document}


Note that \left and \right are not generally needed. See Is it ever bad to use \left and \right?

Also avoid $$ in LaTeX: see Why is $...$ preferable to$$ ... ?

• Thank you, this works perfectly fine now! And thank you for the other tips and hints! – Hubert Schölnast May 30 '19 at 14:43
• Just an additional question: Look at my question again: You can see that in the version written in Word, the brackets have different sizes. The outer pair is higher than the inner. But in LaTeX you get all of them in the same height. Is there a way to make the outer brackets taller than the inner ones when using LaTeX? – Hubert Schölnast May 30 '19 at 19:01
• @HubertSchölnast Yes, of course there is. But let's not add to ugliness. – egreg May 30 '19 at 19:38

I also added some extra negative space (\!) between the elements...

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$N_S(t) = \int_g^h \!\!\int_e^f \!\!\int_c^d \!\!\int_a^b f_x \left(\!\begin{pmatrix} q_1\\q_2\\q_3\\q_4\end{pmatrix},t\!\right) dq_1\,dq_2\,dq_3\,dq_4$
\end{document}