Common Math Formulas

A collection of various math formulas I commonly encounter for quick reference.


The logarithm of a number is the exponent to which some fixed value (the base) is raised to produce a number. For example, if you have a base 10, what is the logarithm of 100,000? The answer is 5, since . This is usually written . Base 10 is referred to as the common logarithm.

Natural Logarithm

The natural logarithm (ln) uses the irrational number (~2.718) as the base. So the natural logarithm of some number can be written as or .

Discrete Logarithm

A discrete logarithm is some integer such that where both and are elements of a finite set. Essentially, a discrete logarithm is a logarithm in a finite group.

Modular Arithmetic

Suppose and are integers and is a positive integer. Then mod if divides . The phrase mod is called a congruence and is read “ is congruent to modulo ”. The integer is called the modulus.

We use the notation mod (without paranthesis) to denote the remainder when is divided by .

mod if and only if mod mod .


  • 101 mod 7 = 3, where 101 = 7 x 14 + 3
  • -101 mod 7 = 4, where 101 = 7 x -15 + 4

Addition and Multiplication in Modular Arithmentic

11 x 13 in modulo 16 is taking 11 x 13 = 143 and reducing by modulo 16. So 143 = 8 x 16 + 15 so 143 mod 16 = 15. A similar method is used for addition.

Number Theory

See here.

Binary Arithmetic

See here.

Binomial Coefficient

Denotes the number of ways of choosing a subset of objects from a set of objects:


See here.


Throughout my 10 year career I have worked as a web developer, systems administrator, software engineer, security analyst and now cybersecurity engineer. I currently develop software applications to automate security vulnerability and compliance scanning and reporting for a multinational financial institution.