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
can someone help me out with a way to represent it
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityThe immediate problem can be solved with an array
, with a local setting of \arraystretch
for reducing the gap between the two rows.
\documentclass{article}
\usepackage{amsmath,bm}
% old fashioned notation for the old fashioned supervisor
\newcommand{\vect}[1]{\underline{#1}}
\newcommand{\matr}[1]{\underline{\underline{#1}}}
% better for typesetting
%\newcommand{\vect}[1]{\mathbf{#1}} % or \bm
%\newcommand{\matr}[1]{\mathbf{#1}} % or \bm
\begin{document}
Here $\vect{Q}$ and $\vect{w}$ are column vectors and $\matr{A}$ is a matrix
\[
\renewcommand{\arraystretch}{0.7}
\begin{array}{@{} c @{} c @{} c @{\;} c @{}}
\vect{Q} & {}={} & \matr{A} & \vect{w} \\
\scriptscriptstyle m\times 1 &&
\scriptscriptstyle m\times n &
\scriptscriptstyle n\times 1
\end{array}
\]
\end{document}
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
without changing the code in the document body.
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.
\documentclass{article}
\usepackage{amsmath,bm}
\begin{document}
\begin{align*}
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}
\end{align*}
\end{document}
\underline{Q}=\underline{\underline{A}}\,\underline{w}
and ask him for permission to use a different, non-disastrous notation for vectors and matrices. :-)
\underline{.}
and\underline{\underline{.}}
probably do what you want but....