Theoretical Computer Science Cheat Sheet
Trigonometry Matrices More Trig.
A
c
θ
B
a
b
C
(0,-1)
(0,1)
(-1,0) (1,0)
(cos θ, sin θ)
Pythagorean theorem:
C
2
= A
2
+ B
2
.
Definitions:
sin a = A/C, cos a = B/C,
csc a = C/A, sec a = C/B,
tan a =
sin a
cos a
=
A
B
, cot a =
cos a
sin a
=
B
A
.
Area, radius of inscribed circle:
1
2
AB,
AB
A + B + C
.
Identities:
sin x =
1
csc x
, cos x =
1
sec x
,
tan x =
1
cot x
, sin
2
x + cos
2
x =1,
1 + tan
2
x = sec
2
x, 1 + cot
2
x = csc
2
x,
sin x = cos
π
2
x
, sin x = sin(π x),
cos x = cos(π x), tan x = cot
π
2
x
,
cot x = cot(π x), csc x = cot
x
2
cot x,
sin(x ± y) = sin x cos y ± cos x sin y,
cos(x ± y) = cos x cos y sin x sin y,
tan(x ± y)=
tan x ± tan y
1 tan x tan y
,
cot(x ± y)=
cot x cot y 1
cot x ± cot y
,
sin 2x = 2 sin x cos x, sin 2x =
2 tan x
1 + tan
2
x
,
cos 2x = cos
2
x sin
2
x, cos 2x = 2 cos
2
x 1,
cos 2x =1 2 sin
2
x, cos 2x =
1 tan
2
x
1 + tan
2
x
,
tan 2x =
2 tan x
1 tan
2
x
, cot 2x =
cot
2
x 1
2 cot x
,
sin(x + y) sin(x y) = sin
2
x sin
2
y,
cos(x + y) cos(x y) = cos
2
x sin
2
y.
Euler’s equation:
e
ix
= cos x + i sinx, e
= 1.
Multiplication:
C = A · B, c
i,j
=
n
k=1
a
i,k
b
k,j
.
Determinants: det A =0iA is non-singular.
det A · B = det A ·detB,
det A =
π
n
i=1
sign(π)a
i,π(i)
.
2 × 2 and 3 × 3 determinant:
ab
cd
= ad bc,
abc
def
ghi
= g
bc
ef
h
ac
df
+ i
ab
de
=
aei + bfg + cdh
ceg fha ibd.
Permanents:
perm A =
π
n
i=1
a
i,π(i)
.
A
a
c
h
b
B
C
Law of cosines:
c
2
= a
2
+b
2
2ab cos C.
Area:
A =
1
2
hc,
=
1
2
ab sin C,
=
c
2
sin A sin B
2 sin C
.
Heron’s formula:
A =
s · s
a
· s
b
· s
c
,
s =
1
2
(a + b + c),
s
a
= s a,
s
b
= s b,
s
c
= s c.
More identities:
sin
x
2
=
1 cos x
2
,
cos
x
2
=
1 + cos x
2
,
tan
x
2
=
1 cos x
1 + cos x
,
=
1 cos x
sin x
,
=
sin x
1 + cos x
,
cot
x
2
=
1 + cos x
1 cos x
,
=
1 + cos x
sin x
,
=
sin x
1 cos x
,
sin x =
e
ix
e
ix
2i
,
cos x =
e
ix
+ e
ix
2
,
tan x = i
e
ix
e
ix
e
ix
+ e
ix
,
= i
e
2ix
1
e
2ix
+1
,
sin x =
sinh ix
i
,
cos x = cosh ix,
tan x =
tanh ix
i
.
Hyperbolic Functions
Definitions:
sinh x =
e
x
e
x
2
, cosh x =
e
x
+ e
x
2
,
tanh x =
e
x
e
x
e
x
+ e
x
, csch x =
1
sinh x
,
sech x =
1
cosh x
, coth x =
1
tanh x
.
Identities:
cosh
2
x sinh
2
x =1, tanh
2
x + sech
2
x =1,
coth
2
x csch
2
x =1, sinh(x)=sinh x,
cosh(x) = cosh x, tanh(x)=tanh x,
sinh(x + y) = sinh x cosh y + cosh x sinh y,
cosh(x + y) = cosh x cosh y + sinh x sinh y,
sinh 2x = 2 sinh x cosh x,
cosh 2x = cosh
2
x + sinh
2
x,
cosh x + sinh x = e
x
, cosh x sinh x = e
x
,
(cosh x + sinh x)
n
= cosh nx + sinh nx, n Z,
2 sinh
2
x
2
= cosh x 1, 2 cosh
2
x
2
= cosh x +1.
θ sin θ cos θ tan θ
00 1 0
π
6
1
2
3
2
3
3
π
4
2
2
2
2
1
π
3
3
2
1
2
3
π
2
10
...in mathematics
you don’t under-
stand things, you
just get used to
them.
– J. von Neumann
v2.02
c
1994 by Steve Seiden
sseiden@acm.org
http://www.csc.lsu.edu/~seiden