Try   HackMD

Mathematical Cheatsheet

General Mathematics

Quadratic equation

Given a quadratic equation of form :

ax2+bx+c=0

We compute the determinant :

Δ=b24ac

If

Δ>=0 then the quadratic equation admits 2 solutions :
x=b±Δ2a
Else, if
Δ=0
then the quadratic equation admits only 1 solution :
x=b2a
If
Δ<0
then the quadratic equation admits no solutions in
R
but in
C
we have :

x=b±iΔ2a

Cubic equation

Sums and Products

i=0ni2=(n2+n)(2n+1)6

i=0ni=n(n+1)2

  • Telescopic sum.

    i=pq(ai+1ai)=(aq+1ap)

  • Telescopic products.

    i=pqai+1ai=aq+1ap

  • Newton's Factorisation.
    for(a,b) in

    R and n in
    N

    (a+b)n=k=0n(nk)akbnk

  • Factorisation

    an+1bn+1=(ab)k=0nakbnk

Complex numbers

For z in

C
z=x+iy

x=Re(z)
and
y=Im(z)

Additions and Multiplications.

z+z=(x+x)+i(y+y)
zz=(xxyy)+i(xy+yx)

|z|
=
Re(z)2+Im(z)2

|z+z|
|z|
+
|z|

Modular Arithmetic

For a, b

N

ab(modp)
if and only if
ab
can be divided by p
In this case, k
N
such that
a=b+kn

Euler's theorem

Given

n
Z
and
a
Z
with
gcd(a,n)=1
then
aϕ(n)1(modn)

Fermat's little theorem

Let a

Z
and p a prime number
apa(modp)

RSA

For

p, q
N
(note : p and q have to be coprimes numbers)
n=pq

Discrete logarithm

Linear algebra