# Appendix A: Mathematical Preliminaries

Some students with limited mathematical background may benefit from a brief introduction to some common mathematical notation frequently used in this text.

An efficient way to write a sum of many variables is with the sigma notation $\sum$. Consider adding up the values $x_{1} + x_{2} + x_{3} + x_{4} + x_{5}$. This can be compactly represented as:

$\sum_{k=1}^{5} x_{k} = x_{1} + x_{2} + x_{3} + x_{4} + x_{5}$

Similarly, if we want to represent a product of many variables, we can use the following notation:

$\prod_{k=1}^{n} x_k = x_{1} \times x_{2} \times ... \times x_{n}$

An example of such a product function is “factorial”, $n!$. This quantity is the produce of the integers from $1$ to $n$, and represents the number of possible arrangements of $n$ distinct objects.

${n! = \prod_{k=1}^{n} k}$

Logarithms are an important function to know in bioinformatics as they are commonly used in scoring systems. Logarithms are powerful because they have the following useful algebraic property (among others):

$\log( A B ) = \log(A) + \log(B)$

We can combine the properties of our sums and products and logs, with the following equation:

$\log \left( \prod_{k=1}^{n} x_{k} \right) = \sum_{k=1}^{n} \log \left( x_{k} \right) .$

Another very useful mathematical construct is the Kronecker Delta function, and can be used for counting. It is defined as follows:

\begin{aligned} \delta_{a,b} = \begin{cases} 1 & \mbox{if } a = b\\ 0 & \mbox{if } a \ne b\\ \end{cases} \end{aligned} \label{indicatorFunction}