viernes, 28 de diciembre de 2018

Cosets and Lagrange's Theorem



Lagrange’s Theorem

Introduction

Lagrange’s theorem is about finite groups. A finite group G is a special kind of a set with a natural number n of elements, n > 0.
In general, a group G is a set in which there is defined an operation like addition, multiplication or any other. Let´s call * a generic operation. The following conditions define a group G, with respect to the operation *: (G, *).
1.       If a, b are elements of G, then a*b is an element of G
2.       (a * b) * c = a * (b * c), for all a, b, c elements of G
3.       There is a unique element e in G such that x * e = x = x * e, for all x in G
4.       For each x in G there is exactly one x’ in G such that x *x’ = e = x´ *x
If a * b = b * a for all a, b in G then the group is commutative (or abelian)
The element e is called neutral or identical. For each element a in G; a’ is called the inverse of a with respect to the operation *.
One of the more known groups is Z, the set of integers, an infinite group. For this group, the operation is addition (* is +), the identical element is 0 (e is 0) and a’, the inverse of integer a with respect to addition, is -a (a’ is -a).
The set {[0], [1], [2], [3], [4]} of integers, mod 5 is a finite group with respect to addition mod 5. In this case, [0] is the identical, [3]’ = [2], [4]’ = [1].

Subgroups of a group

If H is a subset of a group G and H itself is a group, with respect to the operation defined in G, then H is a subgroup of G. For each group G there are two trivial subgroups: G and {e}. Any other subgroups of a group are called proper subgroups of it.
Example: the set of even integers is a proper subgroup of the group (Z, +).

Cosets

The concept of coset for a given subgroup will be useful in the development of Lagrange’s  Theorem.
Let H be a subgroup of the group (G, *). If g is an element of G, then the set
g*H = {g*x| x is an element of H}
Is called a left coset for H.
Analogously, H*g is defined as a right coset for H. If G is an abelian group, there is no difference between right and left cosets.
Example. Let G = {[1], [2], [3], [4], [5], [6]}. This is the set of integers mod 7, without [0]. It may be verified that G is a group under multiplication. Also, it may be seen that H = {[1], [2], [4]} is a subgroup of G. The following are the left cosets for H:
[1].H = {[1], [2], [4]}
[2].H = {[2], [4], [1]}
[3].H = {[3], [6], [5]}
[4].H = {[4], [1], [2]}
[5].H = {[5], [3], [6]}
[6].H = {[6], [5], [3]}
It can be seen that [1].H = [2].H = [4].H; also [3].H = [5].H = [6].H; but [2].H and [3].H are disjoint sets.
From above description it can be obtained a partition of G:
{{[1], [2], [4]}, {[3], [6], [5]}}
It can be verified also that the set J = {[1], [6]} is another subgroup of G. The following are the left cosets for J:
[1].J = {[1], [6]}
[2].J = {[2], [5]}
[3].J = {[3], [4]}
[4].J = {[4], [3]}
[5].J = {[5], [2]}
[6].J = {[6], [1]}
In this case, [1].J = [6]. J, [2].J = [5].J, [3].J = [4].J; but the cosets  [6].J ,  [5].J and [3].J have not elements in common. It can be obtained the following partition of G: {{[1], [6]}, {[2], [5]}, {[3], [4]}}.
The described partitions can be obtained in a different way: starting with the subgroup H = {[1], [2], [4]}, take an element of G, not in H. If [3] is chosen, construct the left coset [3].H = {[3], [6], [5]}. There are not any elements of G that are not included in H or [3].H. So, the process has ended and a partition of G has been obtained: {{[1], [2], [4]}, {[3], [6], [5]}}.
Similarly, for the subgroup J = {[1], [6]}, an element of G not in J is [2]; the corresponding left coset is [2]. J = {[2], [5]}. Now, take another element of G, not in J or [2]. J; if [4] is chosen, [4]. J = {[4], [3]}. There are not any elements of G that are not included in J or [2]. J or [4]. J. So, the process has ended and a partition of G has been obtained: {{[1], [6]}, {[2], [5]}, {[3], [4]}}.
The last process described for above example can be generalized to obtain directly a partition of a given group G. If G is a group and H is a subgroup of it, take an element g1 of G, not in H and construct the left coset g1*H. Claim: H and g1*H are disjoint sets. To prove this (by contradiction), suppose that a belongs to H and g1*H. Then a = g1*h, for some h in H. As H is a group, h’, the inverse of h, is in H. Then a*h´ is in H. That is, g1 is in H. But this contradicts that the element g1 has been chosen out of H. The following note shows details.
Note: As a = g1*h, then a*h’ = (g1*h)*h’ = g1*(h*h’) = g1*e = g1. That is, a*h’ = g1.
Take an element g2 in G which is not in H or g1*H, and construct g2*H. It can be shown, as before, that H and g2*H are disjoint sets. Claim: g1*H an g2*H are disjoint sets too. This will be shown by contradiction.
Suppose that b is an element of G which belongs to g1*H and g2*h. Then b = g1*h1, for some h1 in H, and b = g2*h2, for some h2 in H.
From g1*h1 = g2*h2 it follows that (g1*h1)*h2’ = g2 and g1*(h1*h2’) = g2. As h1 and h2 are elements of subgroup H, h2’ is in H and h1*h2’ = h3, for some h3 in H.
It follows that g*h3 = g2 is in H. But this contradicts what has been supposed before: g2 is not in H.
With the same restrictions for g1, g2 there can be constructed the left cosets g3*H, …, gk*H, where g1, g2, … gk are elements of G and k is not greater than n.
In this process all the elements of G are used in the list of cosets without repetition as it occurred in the first construction of left cosets in above example.
If gr*H = gs*H for gr, gs in G, but not in H, or gr*H, or gs*H then gr*h1 = gs*h2 for some h1 and h2 in H. In this case, (gr*h1)*h2’ = gs, that is gr*(h1*h2’) = gs that is gr*ht = gs, for some ht in H. But then, gs is in gr*H, a contradiction with previous statement.
 As g1, g2, …, gk are chosen with the conditions above described, any two of the left cosets g1*H, g2*H, …, gk*H are disjoint sets.
The union of all the left cosets of H, is G, since each element of G have been used. In this process it has been obtained a partition of G.
If H has m elements, the left coset g*H has m elements too. This means that all the left cosets of H have the same number m of elements. The total number of left cosets (without repetitions) is k.
As G has n elements, and all of them have been used in the construction of the left cosets of H, it follows that m.k = n.
This result is known as Lagrange’s Theorem: If a finite group G has n elements, and H is a subgroup of it with m elements, then m is a factor of n.
In above discussion the concept of left coset of a subgroup has been used. It can be repeated using the concept of right coset. This is necessary, from a strict point of view, since this theorem is valid for a finite group G, abelian or not.






lunes, 22 de octubre de 2018

Series made from Fibonacci's


Variations on a Fibonacci's Theme

Starting with a Python program like the following, there can be obtained several other series.

Original series


Variation (1)



Variation (2)


Variation (3)


Variation (4)


Variation (5)


Variation (6)


Variation (7)


Variation(8)


miércoles, 15 de agosto de 2018

Some Polygonal Spirals

Polygonal Spirals

According with Oxford Advanced Genie Dictionary, a spiral is a shape or design, consisting of a continuous curved line that winds around a central point, with each curve further away from the centre.

In what follows there is a sample of spirals made of regular polygonal lines. Each one is associated with a regular polygon. As the number of sides increases it can be seen that the shape  tends to be a spiral in the sense of above definition.

In what follows some polygonal spirals are drawn using logo programs in Python 3.7 language. This program must be previously installed.


Triangular Spiral


# triang-spiral

from turtle import*
mode('logo')

for i in range(0, 30):     
    fd(10+4*i),lt(120)
Terminator


Square Spiral

# sqr-spiral
from turtle import*
mode('logo')

for i in range(0, 30):     
    fd(10+4*i),lt(90)
Terminator


Pentagon Spiral

#pent-spiral
from turtle import*
mode('logo')

for i in range(0, 30):     
    fd(10+4*i),lt(72)
Terminator






Hexagon Spiral

# hex-spiral
from turtle import*
mode('logo')

for i in range(0, 30):     
    fd(10+4*i),lt(60)
Terminator






Octagon Spiral

# octo-spiral
from turtle import*
mode('logo')

for i in range(0, 30):     
    fd(10+4*i),lt(45)
Terminator







Decagon Spiral

# deca-spiral
from turtle import*
mode('logo')

for i in range(0, 30):     
    fd(10+4*i),lt(36)
Terminator







20 Spiral

(From a regular 20 sides polygon)

# 20-spiral
from turtle import*
mode('logo')

for i in range(0, 30):     
    fd(10+i),lt(18)
Terminator




30 Spiral 

(From a regular 30 sides polygon)

# 30-spiral
from turtle import*
mode('logo')

for i in range(0, 50):     
    fd(5+.5*i),lt(12)
Terminator






The following program can be used to resume the above programs, giving particular values for 'n'

As it can be seen, the numbers 'k' in 'range(0, k)'  can be changed to obtain different sizes.

# poly-siyral
from turtle import*
mode('logo')
#n={3,4,5,8,9,10,12,20}

def polyspiral(n):
    for i in range(0, 30):   
        fd(10+4*i)
        lt(360//n)
#Replace 'n' in the following for a particular value
polyspiral(n)
             
Terminator

martes, 26 de junio de 2018

Some Regular Star Polygons

Regular Polygons and Star Polygons 

A  regular star polygon is a polygonal line whose vertices are vertices of a regular polygon. Their sides are line segments joining vertices of a regular polygon, skipping one or more of them, clockwise or counterclockwise.

The following are samples of star polygons made with logo programs in Python language.
The 3.7 Python program must be previously installed .

# 5-reg-star
from turtle import*
mode('logo')
for i in range(5):
    fd(100),lt(216)
Terminator

# 7-reg-star(1)
from turtle import*
mode('logo')
for i in range(7):
    fd(100),rt(102.9)
Terminator




# 7-reg-star(2)
from turtle import*
mode('logo')
for i in range(7):
    fd(100),rt(154.3)
Terminator

# 8-reg-star
from turtle import*
mode('logo')
for i in range(8):
    fd(100),rt(135)
Terminator

# 9-reg-star(1)
from turtle import*
mode('logo')
for i in range(9):
    fd(70),rt(80)
Terminator


# 9-reg-star(2)
from turtle import*
mode('logo')
for i in range(9):
    fd(70),rt(160)
Terminator


# 10-reg-star
from turtle import*
mode('logo')
for i in range(10):
    fd(100),rt(108)
Terminator




# 12-reg-star
from turtle import*
mode('logo')
for i in range(12):
    fd(100),rt(150)
Terminator






lunes, 25 de junio de 2018

Some Regular Polygons

Drawing Regular Polygons

In what follows some regular polygons are drawn using logo programs in Python 3.7 language. This program must be previously installed.

#Equilateral triangle
import cmd,sys
from turtle import*
color('black')
mode('logo')
for i in range(3):
    fd(100),lt(120)


 Terminator





#Square
import cmd,sys
from turtle import*
color('black')
mode('logo')
for i in range(4):
    fd(100), lt(90)
Terminator






# Regular Pentagon
import cmd,sys
from turtle import*
color('black')
mode('logo')
for i in range(5):
    fd(100), lt(72)
Terminator


#Regular Hexagon.
import cmd,sys
from turtle import*
color('black')
mode('logo')
for i in range(6):
    fd(50),lt(60)
Terminator


#Regular Octagon
import cmd,sys
from turtle import*
color('black')
mode('logo')
for i in range(8):
    fd(50),lt(45)
Terminator

#Regular Nonagon
import cmd,sys
from turtle import*
color('black')
mode('logo')
for i in range(10):
    fd(50),lt(40)
Terminator



#Regular Decagon
import cmd,sys
from turtle import*
color('black')
mode('logo')
for i in range(10):
    fd(50),lt(36)
Terminator


#Regular Dodecagon
import cmd,sys
from turtle import*
color('black')
mode('logo')
for i in range(12):
    fd(50),lt(30)
Terminator

miércoles, 6 de junio de 2018

Integer Pythagorean Triples


Pythagorean Triples

With positive integers

The following is a Python 3.7 program. It must be previously installed.

print('Type a positive integer')
integer=input()
integer=int(integer)
for a in range(1,integer):
    for b in range(1, integer):
        for c in range(1, integer):
            if a**2+b**2==c**2:
                if a <b<c                   
                    print([a,b,c])


Example (1): For numbers not greater than 8

Type a positive integer
8
[3, 4, 5]

Example (2): For numbers not grater than 30

Type a positive integer
30
[3, 4, 5]
[5, 12, 13]
[6, 8, 10]
[7, 24, 25]
[8, 15, 17]
[9, 12, 15]
[10, 24, 26]
[12, 16, 20]
[15, 20, 25]
[20, 21, 29]

Divisors of a positive integer

All the divisors...

of a positive integer

The following is a 3.7 Python program. It has to be previously installed

#Divisors of a positive integer
x=int(input('Type a positive integer  '))
for j in range(1,x+1):
    if x//j==x/j:
        print(j,end=',')
        j=j+1

Example (1): For 3780

Type a positive integer  3780
1,2,3,4,5,6,7,9,10,12,14,15,18,20,21,27,28,30,35,36,42,45,54,60,63,70,84,90,105,108,126,135,140,180,189,210,252,270,315,378,420,540,630,756,945,1260,1890,3780,

Example (2): For 3781

Type a positive integer  3781
1,19,199,3781,

Example 3: For 3701

Type a positive integer  3701
1,3701,

martes, 5 de junio de 2018

Fractions and decimals

Fractions and decimal representation

The following is a Python 3.7. It must be previously installed,

#Fractions and decimal representation
print('Type integer part and no periodical part, without decimal point')
a=int(input())
print('Type the same figures and add the figures of the first period')
b=int(input())
numerator=b-a
print('Type 9 a number of times equal to number of figures in the period')
print('and type 0 a number of times equal to number of figures')
print('before the periodic part, and to the right of decimal point')
denominator=int(input())
print('The generator fraction is',numerator,'/',denominator)

Example (1): Given 25.36124242424...

Type integer part and no periodical part, without decimal point
25361
Type the same figures and add the figures of the first period
2536124
Type 9 a number of times equal to number of figures in the period
and type 0 a number of times equal to number of figures
before the periodic part, and to the right of decimal point
99000
The generator fraction is 2510763 / 99000
or, simplyfying, 836921/33000

Example(2): Given 4.23232323...

Type integer part and no periodical part, without decimal point
4
Type the same figures and add the figures of the first period
423
Type 9 a number of times equal to number of figures in the period
and type 0 a number of times equal to number of figures
before the periodic part, and to the right of decimal point
99
The generator fraction is 419 / 99

lunes, 4 de junio de 2018

Three points for a plane

Plane determined by...

three points


The following is a Python 3.7 program. It must be previously installed.

#Equation of a plane, (Ax + By + Cz + D = 0) known three of its points
#(a, b, c), (d, e, f,), (g, h, t)

print('type, one at a time, a, b, c, d, e, f, g, h, t')

a = float(input())
b = float(input())
c = float(input())
d = float(input())
e = float(input())
f = float(input())
g = float(input())
h = float(input())
t = float(input())

A=b*f+c*h+e*t-f*h-c*e-b*t
B=-a*f-c*g-d*t+f*g+c*d+a*t
C=a*e+b*g+d*h-b*d-e*g-a*h
D=a*e*t+b*f*g+c*d*h-c*e*g-b*d*t-a*f*h
    
print('lthe equation of the plane is')
print(A,'x+',B,'y+',C,'z+',D,'=0')


Example (1). For (-3, 1, -2), (5, -4, -1), (4, 5, 2)

-3
1
-2
5
-4
-1
4
5
2
the equation of the plane is
-24.0 x+ -25.0 y+ 67.0 z+ -87.0 =0

This equation could be rewritten as 24x + 25y - 67z -87 = 0.

Example(2): For (2, 3, 1), (4, -2, 5), (6, 1, 6)

2
3
1
4
-2
5
6
1
6
the equation of the plane is
-17.0 x+ 6.0 y+ 16.0 z+ 0.0 =0
This equation could be rewritten as 17x - 6y -16z = 0  (The point (0, 0, 0) is in the plane)

Example (3):For (1, -2, 5), (13, 7, 11), 37, 25, 23)

1
-2
5
13
7
11
37
25
23
1
-2
5
13
7
11
37
25
23
the equation of the plane is
0.0 x+ 0.0 y+ 0.0 z+ 0.0 =0

That is, 0x + 0y + 0z + 0 = 0

In this case, the three given points are collinear 

Circle, known three points

Center and radius of a circle...

given three points in a plane

What follows is a Python.3.7 program. It must be installed to get results.

#Given three points (a,b),(c,d),(e,f) in a plane

print ('type, one at a time, a, b, c, d, e, f')

a=float(input())
b=float(input())
c=float(input())
d=float(input())
e=float(input())
f=float(input())

if a*d+b*e+c*f-e*d-b*c-a*f==0:
    print('collinear points')
    quit()
else:
    a1=(2*(a-e))
    a2=(2*(e-c))
    b1=(2*(b-f))
    b2=(2*(f-d))
    c1=(-a**2-b**2+e**2+f**2)
    c2=(c**2+d**2-e**2-f**2)
    k=(a2*b1-a1*b2)
    m=(c1*b2-c2*b1)*(k**-1)
    g=(a1*c2-a2*c1)*(k**-1)
    t=m-a
    u=g-b
    h1=t**2+u**2
    h2=h1**.5

    print('Center coordinates are: (',m,',',g,')')
    print('Radius ',h2)

Example (1) For (3,-4), (1, 5), (2,0)
3
-4
1
5
2
0
Center coordinates are: ( 96.5 , 21.5 )
Radius,  96.91491113342673

Example(2) For (2, 3), (1, 5), (4, -1)
2
3
1
5
4
-1
collinear points

The program must be closed.



sábado, 2 de junio de 2018

Quadratic equations

Solving quadratic equations (automated)

What follows is a Python.3.7 program. It must be previously installed.

#Quadratic equation
print('For the equation ax**2 + bx + c= 0')
print('type, one at a time, a, b, c')

a=float(input())
b=float(input())
c=float(input())

d =b**2-4*a*c

print('discriminant =',b**2-4*a*c)

e1=(-b+(d**.5))*(2*a)**-1
e2=(-b-(d**.5))*(2*a)**-1
f1=-b*(2*a)**-1
f2=((-d)**.5)*(2*a)**-1

if(d>=0):
    print('real solutions')
    print('x1 =',e1)
    print('x2 =',e2)

else:
    print('complex solutions')
    print('x1 =',f1,'+',f2,'i')
    print('x2 =',f1,'-',f2,'i')

Example 1. Given x**2 - x - 20 = 0
1
-1
-20
discriminant = 81.0
real solutions
x1 = 5.0
x2 = -4.0

Example 2. Given 5x**2 - 2x + 7 = 0
5
-2
7
discriminant = -136.0
complex solutions
x1 = 0.2 + 1.1661903789690602 i
x2 = 0.2 - 1.1661903789690602 i

viernes, 1 de junio de 2018

Equation of any line in a plane

Equation of a line in a plane (automated)


What follows is a Python.3.7 program. It must be installed to get results

#Equation of any line in a plane in the form Ax + By + C =0
#given two points, (a,b), (c,d)

print('type, one at a time,  a, b, c, d')
a=float(input())
b=float(input())
c=float(input())
d=float(input())
print('the equation is')
print((b-d),'x+',(c-a),'y+',(a*d-b*c),'=0')

Example(1): for (3, 4), (5, -2)
3
4
5
-2
the equation is 6.0 x+ 2.0 y+ -26.0 = 0
 That is, 6x + 2y -26 = 0

Example (2): for (4, 5), (4, -2)
4
5
4
-2
the equation is 7.0 x+ 0.0 y+ -28.0 =0
That is, 7x - 28 = 0

Example (3): for (6, 7), (-4, 7)
6
7
-4
7
the equation is 0.0 x+ -10.0 y+ 70.0 =0
That is, -10y + 70 = 0

GCF and LCM


GCF and LCM, automated


What follows is a working Python.3.7 program.  It must be installed to get results.

#gcf and lcm
def gcf(a,b):
    if a%b==0:
        return b
    else:
        return gcf(b,a%b)

def lcm(a,b):
    m = int()
    m = a*b//gcf(a,b)
    return m
print("Type gcf(a,b), for a,b positive integers")
print("Type lcm(a,b), for a,b positive integers")


Example:

 gcf(358, 456)
2
 lcm(358,456)
81624
 
Note: a % b means the residue for division between a and b
Example: 7 % 4 =3.

lunes, 23 de abril de 2018

From Real to Imaginary

Complex Numbers

Introduction

Natural numbers are appropriate to express how many elements are in a given collection of objects. The set of natural numbers is N ={0, 1, 2, ...}
An equation like x + a = b can be solved in N, if ab.
Example: From x + 7 = 12 it is obtained x = 12 - 7 = 5.

An equation of the form x + a = b can be solved without restrictions in the set of integers  which contains zero, positive and negative numbers: Z = {..., -3, -2, -1, 0, +1, +2, +3, ...}.
Example: From x + +9 = -14 it is obtained x = -14 + -9 = -23.

Usually, positive integers +1, +2, +3, ... are identified with the natural numbers 1, 2, 3, ... due to an isomorphism between them. They behave the same way in several instances. The former equation can be written as x + 9 = -14.

In the set Z, an equation of the form x * c = d can be solved  if c is a factor of d.
Example: From  x * 8 = -40  it is obtained x = -40 ÷ 8 = -5.

Rational numbers can be represented in the form a/b, with aintegers and b ≠ 0. Also they can be represented by means of decimals terminating or periodic.
Examples:  3/8= 0.375. -8/3 = -2.666...

In the set Q of rational numbers, an equation of the form x * c = d  can be solved with the only restriction of c ≠ 0.
Example: From x * (3/4) = -8/7 it is obtained x = (-8/7)*(4/3) = -32/21.

An equation like x2 = 2 has not solution in Q , since √2 is not a rational number. It belongs to I, the set of irrational numbers. An irational number can be represented by means of an infinity not periodic decimal.
Example: √2 = 1.41421356...

The set Q I constitutes R, the set of real numbers.

An equation like x2 + 1 = 0 has not solution in R, since for every x in R,  x * x cannot be negative.

If the history continues in the same way as before, it will be necessary to have a numeric set in which an equation like the former has a solution. It has to include a number whose square is -1.

Such a number cannot be real. So, in analogous way with the rational-irrational opposition, that number has been called the imaginary unit and it has been symbolized with i.

In analogous way with the ordinary opposite meaning for the words positive-negative, rational-irrational, the situation  with real-imaginary has a historical background of initial reject from the mathematical community.

The set C

As it will be seen,the set of complex numbers, designated by C, has a subset of it which is isomorphic with R, in the same way as Z has a subset of it, which is isomorphic with N, namely the positive integers. Also, Q has a subset isomorphic with Z, namely the rationals that can be represented with 1 as denominator. Examples: 3/1, -7/1.

To get acquainted with the set R, it is very helpful to represent it  geometrically by means of a straight line whose points correspond to real numbers.

In analogous way, to get acquainted with the set C, it will be very helpful to have a geometric representation of it. The complex numbers are nicely represented as points in a plane.

The cartesian plane, in which every point can be identified by an ordered pair of real numbers, will be the adopted representation for C.

The x-axis of the cartesian representation contains the real component of a complex number. The y-axis contains the imaginary part of a complex number.

A complex number z will be represented as z = a + bi.
The corresponding  point z is determined by the  cartesian coordinates (ab).
Examples: w = 3 + 4i , s = -2 + 3i.

Vectors and complex numbers

Cartesian representation of complex numbers  is connected with representing them by means of vectors in the cartesian plane, since each point (a, b) can be associated with an oriented segment with origin in the point (0, 0) and end-point in (ab).

Examples: w = 3 + 4s = -2 + 3i.


Each oriented segment in the cartesian plane is a representative of a vector in the plane. This means that, for instance, the oriented segment O→W above,  represents a vector in the plane which consists in all of the segments in the plane with same lenght, same direction (parallel) and same orientation as O→W.

In this way, the oriented segment F→G represents the same vector as O→W.

The oriented segments with origin O will be called principal representatives of vectors in the cartesian plane.

In this way, every principal representative of a vector in the cartesian plane can be identified with a complex number.

Addition and subtraction in C

If (a, b) and (c,d) are two points in the cartesian plane then, by definition, 

(a, b) + (c, d) = (a + c, b + d)

Example: (2, 3) + (-3, 1) = (-1, 4)

This can be seen also as addition between the corresponding vectors.

To obtain the result of this addition it can be used the above parallelogram construction, in which the diagonal gives the answer.
Using complex numbers for the above example, (2 + 3i ) + (-3 + 1i) = -1 + 4i.

Subtraction is defined in terms of addition:

                                          (a, b) - (c, d) = (a, b) + (-c, -d


Example: (2 + 3i) - (-3 + 1i)  =  (2 + 3i) + (3 - 1i) = (5 + 2i)

To find a representative for the difference between two vectors, it can be used a graphic rule: "complete the triangle" as it can be seen in above example.

Modulus of a complex number

By definition, for the complex number  z = a + bi the modulus of  z is the real number 

Example: if  z = (3,4) then |z| = 5

It follows that for a given z, all the points in the circle centered in (0, 0) have the same modulus as z.

In other words, the set of  complex numbers z such that |z| = r, for a given positive real number r is a circle centered in (0, 0) and radius r in the cartesian plane.

Multiplication in C

The product between two complex numbers can be performed in the same way as it is done in R, between two algebraic expressions, taking in consideration that i *i = -1. 

If z = a + band w = c + di, then z * w = a.c - b.d + (a.d bc)i

Or, by definition, (a, b) * (c, d) = (a.c - b.da.d + b.c)

Example: (2, 3) * (-3, 1) = (-9, -7)

The imaginary unit i can be identified with the complex number 0 + 1i. So, the correspondent point in the cartesian plane is (0, 1).

Using above definition, (0, 1) * (a, b) = (-b, a). This can be written as i * (a + bi)  = -b + ai.


Example: (0, 1) * (2, -3) = (3, 2)

An important relation between z and can be seen graphically as follows:


By geometric considerations it can be seen that multiplying (a, b) by i determines  a counter-clockwise rotation of 90°, around the point (0, 0), of the vector corresponding to (a, b).

Neutral and inverses in C

If (x, y) is  neutral element for addition in C, then (a, b) + (x, y) = (a, b). 
That is, a + x = a and b + y = b. Conclusion, x = 0 and y = 0. The complex number (0, 0) is neutral for addition.

If z = (a, b)  then its inverse with respect to addition has to be z' = (x, y) such that z + z' = (0, 0). That is, a + x = 0 and b + y = 0. 
Conclusion, x = -a and y = -b.

Example: if z = (-12, 5) then z' = (12, -5), since zz'= (0, 0).

In this case, z' is ordinary designated by -z.

If (x, y) is  neutral element for multiplication in C, then (a, b) * (x, y ) = (a, b). Using above definition, (a, b) * (x, y ) = (ax - by, ay + bx). This means,

ax - by = a
bx + ay = b

The solution for above system is, x = 1, y = 0.

Example: (-8, 9) * (1, 0) = (-8, 9)

If z = (a, b)  then its inverse with respect to multiplication has to be z' = (x, y) such that z * z' = (1, 0). Using definition for multiplication, again, the system to be solved is

ax - by = 1
bx + ay = 0
The solution is

x = a/(a2 +b2 )

y = -b/(a2 +b2 )

Where a+bhas to be different from zero. This means that (0, 0) is the only complex number that has not inverse with respect to multiplication.

Example: if z = (2, 3), then z' = (2/13, -3/13).

In this case, z' is ordinary designated by 1/z.

An equation like Az + B = D, has solution in C, for any complex numbers A, B, D, and A ≠ (0, 0).

Example: (2, -3)z + (-4, 5) = (2/3, -8)
Solution: z = [(2/3, -8) - (-4, 5)] ÷ (2, -3) = (14/3, -13) * (2/13, 3/13) = (145/39, -12/13)

Trigonometric representation


For a complex number z =  (a, b)  for which |z| = r and


the point corresponding to z = (a, b) can be determined by

a = r.cos θ
b = r.sin θ

where θ is the oriented angle with origin in the positive x-axis and end in the line between (0,0) and the point (a, b).

The representation a + bi takes the form r.(cos θ + i.sin θ) which can be simplified as r.cis θ.

Example: 


z = -3 + 4i

tan θ = 4/-3

arctan (4/-3) = 126° 52' 11.63'' = θ

r = 5 

z = 5.cis θ


Multiplication and trigonometric representation

If z = r.cis θ and w = s.cis β then the product z *w can be obtained as follows:

z *w = [r(cos θ + i.sin θ)] * [s(cos β + i.sin β] = 

(r s)[(cos θ * cos β - sin θ * sin β) + i(cos θ * sin β  + sin θ * cos β)] =

(rs)[cos (θ + β) + i sin (θ + β)] = (rs)cis (θ + β)

Example: z = 3.cis 30°. w = 2 cis 45°. z * w = 6 cis 75°


De Moivre's Formula

Multiplication of a complex number by itself  can be extended (by induction) more than twice to obtain the so called De Moivre's Formula.

If z = r cis θ then zn = rn cis nθ

Example: z = 2 cis 30°;  z3 = 8 cis 90°


Roots for the equation zn = w

If the De Moivre's formula were extended for rational exponents then it would be possible to solve an equation like z4 = (0, -1), that is, z4 = 1 cis π.
In this case, w = 1. cis π and z = 11/4 cis (π/4) or simply, cis π/4. 

An equation witth grade 4 has 4 solutions, according with the fundamental theorem of algebra.

To obtain all such solutions is necessary to consider not only the value π/4 but (π/4 + 2n π)/4, for n = 0, 1, 2, 3.

For n = 0, the corresponding solution is z(0) =  cis π/4
For n = 1, the corresponding solution is z(1) =  cis 3π/4
For n = 2, the corresponding solution is z(2) =  cis 5π/4
For n = 3, the corresponding solution is z(3) =  cis 7π/4

These solutions can be represented graphically as follows: