# A word about scientific notation

When you are working as an engineer, you commonly need to report some of your work or finding. This could be either for documentation reasons, for the publication of a scientific paper, or even for a dissertation or book.

## First things first

In these situations, it is always beneficial to make up your mind and think about, how you actually want to present your work. Of course, math will be your friend and in consequence you will require a setup, which allows for a clean typesetting of formulas and equation. I think it would be redundant to open Pandora's box and compare \(\mathrm{\LaTeX}\) and other proprietary solutions; there are so many advantages of using \(\mathrm{\LaTeX}\) that I do not even need to name a single one.

## However,

using \(\mathrm{\LaTeX}\) will not guarantee for a clean and consistent mathematical notation. Therefore, I'd like to provide some guidelines, which I follow and consider as useful.

### Set variables in italic, constants and descriptive subscripts go upright

Consider the following simple equation

\begin{align} a \cdot b &= c \text{.} \end{align}Obviously, all mathematical symbols are variables, as they could be bound to specific values. Now lets consider that you need these variables in different contexts. For instance, you could think of the variables referring to a test set of data and a training set of data. Then, you can rewrite the equation for the test set as follows:

\begin{align} a_{test} \cdot b_{test} &= c_{test} \end{align}Wait! That seems to be wrong…now we introduced a few other variables, namely \(t\), \(e\), and \(s\). Further, we used some expression as subscript. But why didn't we write

\begin{align} a_{t^2es} \cdot b_{t^2es} &= c_{t^2es} \, \text{?} \end{align}The answer is obvious: We want a descriptive subscript rather than new variables in the subscript. Lets correct it…

\begin{align} a_{\mathrm{test}} \cdot b_{\mathrm{test}} &= c_{\mathrm{test}} \end{align}
looks way better.
Therefore, keep in mind to protect every letter, which does not correspond to a variable, from being set in italic.
If you are working with functions, you will find that some functions are already bound to macros, that you could easily use e.g `\cos`

.
However, if you want to define an own function you could and should do this by declaring a new math operator. For instance the unit box function, which is also referred to as \(\mathrm{rect}\) could be defined like this:

\DeclareMathOperator{\rect}{rect}

### Vectors, matrices, and tensors should be bold symbols

If you are working in more than 3 dimensions the typical typesetting of vectors does not really appear to be reasonable. Therefore, you can consider to set them as bold symbols. Note that I favour the use of `\boldsymbol`

instead of `\mathbf`

, since variables should be set italic. Moreover, Greek letters are lacking support for being set upright in bold. Then, you end up with e.g. \(\boldsymbol{v}\) instead of \(\vec{v}\). The same holds true for matrices and a very basic linear system of equations reads

For transposition of vectors or matrices, I really like the `\top`

symbol. Then, a transposed vector is set as \(\boldsymbol{v}^{\top}\) instead of \(\boldsymbol{v}^{\mathrm{T}}\).

Maybe you want to index into your vectors or even extract slices from matrices or tensors. In this case, I use something like this:

\begin{align} \boldsymbol{A}_{[1,\bullet]} \boldsymbol{x} = \boldsymbol{b}_{[1]} \, \text{.} \end{align}You could also write

\begin{align} \boldsymbol{A}_{[1,\bullet]} \boldsymbol{x} = b_1 \, \text{,} \end{align}in order to indicate that we find a scalar on the right hand side. Even other notations are fine, as long as they are consistent over your Document.

### Use macros, if possible

In the case you have already written some pages and find a limitation of your notation, you might want to be able to change all occurrences at once. In order to do so, you could define macros in your preamble. If you use the macros consistently, you can refine your document easily by updating the macros. For instance you could define

\renewcommand{\vec}[1]{{\boldsymbol{#1}}} \newcommand{\mat}[1]{\boldsymbol{#1}}

for setting vectors and matrices.

## Hopefully,

you can benefit from this post and consider the simple ideas from above as a reference for your next scientific document.