How to typeset vector like this in latex

enter image description here

I came across an article

How do I typeset vertical and horizontal lines inside a matrix?

which mentions below code

U = 
    \vertbar & \vertbar & & \vertbar \\
    u^{(1)} & u^{(2)} & \ldots & u^{(n)} \\
    \vertbar & \vertbar & & \vertbar 

and generates equation like this

enter image description here

I have trouble putting right part in the equation, How can I do it.

  • 4
    Member for more than 2 years without a MWE? What have you tried so far? – CarLaTeX Aug 22 '17 at 4:21
  • 5
    You could add a simple matrix with the u's, we'll add the rules. Helping is fun but re-typing all is boring! – CarLaTeX Aug 22 '17 at 4:34
  • 2
    Of course, but why should I do it? Please, help us to help you. As is, your question shows no effort by you, it's a just-do-it-for-me one. – CarLaTeX Aug 22 '17 at 5:48
  • 1
    I do not understand where your problem is. If you add \in \mathbb R^{n \times n} after \right], the result should be the desired one. – epR8GaYuh Aug 22 '17 at 7:23
  • 1
    Much better: as you can see, you've already got an answer this way. Next time remember to add a complete MWE, your code snippet isn't compilable (even if the complete one can be copied from the link). – CarLaTeX Aug 22 '17 at 7:26

I would prefer to use bmatrix from amsmath. The R can be done using \mathbb from amssymb (or amsfonts).

  U = 
    \vert & \vert & & \vert\\
    u^{(1)} & u^{(2)} & \ldots & u^{(n)} \\
    \vert & \vert & & \vert    
  \in\mathbb{R}^{n\times n}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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