i'm working on my latex thesis and i want to represent this equation, matrix is upperCase letter with 2 lines under it, and vector just one line below, see the picture attached enter image description here

can someone help me out with a way to represent it

  • 2
    that seems very much a "blackboard" notation, do you really want that in a typeset paper? (\underline{.} and \underline{\underline{.}} probably do what you want but.... – David Carlisle Apr 17 at 20:57

The immediate problem can be solved with an array, with a local setting of \arraystretch for reducing the gap between the two rows.


% old fashioned notation for the old fashioned supervisor

% better for typesetting
%\newcommand{\vect}[1]{\mathbf{#1}} % or \bm
%\newcommand{\matr}[1]{\mathbf{#1}} % or \bm


Here $\vect{Q}$ and $\vect{w}$ are column vectors and $\matr{A}$ is a matrix
\begin{array}{@{} c @{} c @{} c @{\;} c @{}}
\vect{Q} & {}={} & \matr{A} & \vect{w} \\
\scriptscriptstyle m\times 1 &&
\scriptscriptstyle m\times n &
\scriptscriptstyle n\times 1


enter image description here

I strongly advise to use macros for inputting matrices and vectors. When your supervisor will realize that the old-fashioned notation is also very ugly in print (it was used in the typewriter times), you can simply change the definitions. If you switch the comments in the code above, the result will be

enter image description here

without changing the code in the document body.

  • thank you so much that's exactly what i'm searching for, i appreciate your help – sana ch Apr 17 at 23:06

The notational possibilities are sheer endless. Which notational practice you wish to adopt may be dictated by typographic conventions specific to a field, a language, a country, etc. LaTeX and TeX don't prescribe any particular notational practice.

The following screenshot shows five possibilities; I have no doubt that there are many more. Echoing a thought already expressed by David Carlisle, "blackboard-style" notational conventions (e.g., with one or two underlines) are not necessarily the best when applied to typeset, as opposed to hand-written, material.

enter image description here


Q &= Aw \\
\mathrm{Q} &= \mathrm{A}\mathrm{w}\\
\mathbf{Q} &= \mathbf{A}\mathbf{w}\\
\vec{Q} &= A\vec{w}\\
\bm{Q} &= \bm{A}\bm{w}
  • 1
    thank you for your reply, i share the same opinion as you, i think it's a blaskboard notation but my supervisor insist to do it this way in my thesis – sana ch Apr 17 at 21:29
  • 1
    @sanach - If your supervisor is so strongly wedded to this borderline unsuitable typographic convention, just show him the output of \underline{Q}=\underline{\underline{A}}\,\underline{w} and ask him for permission to use a different, non-disastrous notation for vectors and matrices. :-) – Mico Apr 17 at 21:33
  • 2
    @sanach Explaining matrix multiplication in a thesis? That's what every sophomore should know! – egreg Apr 17 at 21:49

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.