I want Z underlined to show it as a complex number in math-mode. For lowercase z I can use \underline{z} but if I use it with Z it displays the normal Letter without a underline. How do I get a underline below my Z?

  • 1
    Welcome to the TeX.SE. community. What is your minimal complete code in tex format? May 22, 2023 at 13:41
  • \underline{Z} works in a minimal article class document. (although arguably it extends too far to the right and would be prettier if extending only about to the length of the bottom horizontal part of that letter)
    – user691586
    May 22, 2023 at 16:14

1 Answer 1


According to this related post: what you are missing is \usepackage{amsmath} then $\underline{X}$ should do the trick, see minimal example:

    $\vec{x}$  $\overline{x}$  $\underline{x}$  $\mathbf{x}$
    $\vec{\mathbf{x}}$  $\overline{\mathbf{x}}$  $\underline{\mathbf{x}}$ 

works, also with capital letters. enter image description here

  • 1
    I compiled your document commenting out loading of amsmath and output is very comparable. In particular for \underline{X}.
    – user691586
    May 22, 2023 at 16:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .