Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Basics In Maths

Laurent Navoret
laurent.navoret@math.unistra.fr

IRMA - U.F.R. Maths-Info


Office 222
Plan

1 Lecture 1: Linear algebra

2 Lecture 2: Probability, part 1

3 Lecture 3: Probability, part 2

4 Lecture 4 : Image analysis

5 Lecture 5 : Ordinary and stochastic differential equation (ODE, SDE), part 1

6 Lecture 6 : Ordinary and stochastic differential equation (ODE, SDE), part 2

7 Lecture 7 : Partial differential equation (PDE), part 1

8 Lecture 8 : Partial differential equation (PDE), part 2


Problem : system with two unknowns x and y

3x + y = 4
−x + 2 y = 1

Graphical resolution : intersection of two straight lines


Definition (Vectors)
   
x1 4
~
x= = ∈ R2
x2 5
Each point of the plane is assimilated
  to avector.

2 4 6
We can add two vectors : + =
−1 5 4
   
4 8.4
We can multiply a vector by a real : 2.1 × =
5 10.5
Definition (Basis)
Two vectors of R2 form a basis of the plane if any vector can be (uniquely)
written as a linear combination of the two. For instance :
   
1 0
( , )
0 1

Is it a basis
  ?        
2 0 2 −4 2 −4
( , ) ( , ) ( , )
1 1 1 −2 1 −2.2
Definition (Vectors)
   
x1 4
~
x= = ∈ R2
x2 5
Each point of the plane is assimilated
  to avector.

2 4 6
We can add two vectors : + =
−1 5 4
   
4 8.4
We can multiply a vector by a real : 2.1 × =
5 10.5
Definition (Basis)
Two vectors of R2 form a basis of the plane if any vector can be (uniquely)
written as a linear combination of the two. For instance :
   
1 0
( , )
0 1

Is it abasis
 ?    
−4
    
2 0 2 −4 2
( , ) basis ( ,
 ) ( , ) basis
1 1 1 −2
 1 −2.2

Definition (Matrices 2 × 2)
   
A1,1 A1,2 3 1
A= = ∈ M2 (R)
A2,1 A2,2 −1 2
A is a matrice of size 2 × 2.
Ai,j is the component of the i-th row and the j-th column.
The components A11 and A22 form the diagonal of the matrix.

Definition (Multiplication matrix vector)


• Example:       
3 1 1 3·1+1·2 5
= =
−1 2 2 −1 · 1 + 2 · 2 3
• Mapping:
x ∈ R2
~ x ∈ R2
7−→ A ~
• Linearity:

y ∈ R2 ,
∀~x, ~ ∀λ ∈ R, A (~
x + λ~
y) = A ~
x + λA~
y
Initial problem:

3 x1 + x2 = 4
−x1 + 2 x2 = 1

It writes now:
   
x1 4
A =
x2 1
 
4
Question: finding the vector ~
x which is map onto by A.
1
Is there a solution to the linear problem ? is there uniqueness ?
Definition (Addition of two matrices)
     
A11 A12 B11 B12 A11 + B11 A12 + B12
A+B = + =
A21 A22 B21 B22 A21 + B21 A22 + B22

Definition (Multiplication of two matrices)

    
A11 A12 B11 B12 A11 B11 + A12 B21 A11 B12 + A12 B22
AB = =
A21 A22 B21 B22 A21 B11 + A22 B21 A21 B12 + A22 B22

Example:
  
1 3 3 3
=
2 1 1 2
  
1 3 1 0
=
2 1 0 1
  
1 3 1 0
=
2 1 0 2
Definition (Addition of two matrices)
     
A11 A12 B11 B12 A11 + B11 A12 + B12
A+B = + =
A21 A22 B21 B22 A21 + B21 A22 + B22

Definition (Multiplication of two matrices)

    
A11 A12 B11 B12 A11 B11 + A12 B21 A11 B12 + A12 B22
AB = =
A21 A22 B21 B22 A21 B11 + A22 B21 A21 B12 + A22 B22

Example:
    
1 3 3 3 6 9
=
2 1 1 2 7 8
    
1 3 1 0 1 3
=
2 1 0 1 2 1
    
1 3 1 0 1 6
=
2 1 0 2 2 2
Definition (Inverse of a matrix)
 
1 0
• Identity matrix : Id =
0 1
• B is the inverse of the matrix A if

AB = Id

We note B = A−1 .
If A has an inverse, A is said invertible. If not, A is said singular.

is there a unique solution ? ⇔ is there an inverse ?

A ~x = ~b ⇔ A−1 A ~
x = A−1 ~b ⇔ x = A−1 ~b
~
Definition (determinant of a matrix)
• real : det A = A11 A22 − A12 A2,1 ∈R

det A 6= 0 ⇔ A invertible (A−1 exists)


det A = 0 ⇔ A singular (A−1 does not exist)

 
3 1
Example: det = 3 · 2 − (−1) · 1 = 7.
−1 2
Ý The matrix is invertible.
Solving the linear system:
1 elimination method:

3 x1 + x2 = 4 7x2 = 7 x2 = 1
−x1 + 2 x2 = 1 −x1 + 2 x2 = 1 x1 = 1

Ý Generalization: Gauss algorithm

2 Formula for the inverse

   
1 A2,2 −A1,2 4
A−1 = and x = A−1
~
det A −A2,1 A1,1 1

Þ In practice for large linear system (for the computational cost): prefer the
first method.
Þ Use Matlab (or Scilab)
Definition (the inner product of two vectors is the real...)
   
x1 y1
~x · ~
y= · = x1 y1 + x2 y2 ∈R
x2 y2

Definition (the norm (or the length) of one vector is the real...)
√ √
k~xk = x·~
~ x = x1 x1 + x2 x2 >0

Definition (Orthogonality)

x·~
~ y
cos θ =
k~
xk k~
yk
where θ is the angle between the two vectors

π
orthogonal vectors ⇔ θ=±
2
⇔ x·~
~ y=0
Definition (Orthogonal/orthonormal basis)
Orthogonal basis = A basis made of orthogonal vectors.
Orthonormal basis = An orthogonal basis made of vectors of norm 1.

Definition
 (Transposition
 : rows become columns)
A1,1 A2,1
AT =
A1,2 A2,2

Definition (Orthogonal matrices)


• the columns of A form an orthonormal basis
• the inverse of A is its transposed matrix: AAT = Id
• A preserves inner product:

∀~
x, ~
y, x·~
~ x · A~
y = A~ y

Example : rotation matrices


Definition (Symmetric matrices)
AT = A

Example:    
3 1 3 1
−1 3 1 2

Definition (Eigenvalue)
The real λ is an eigenvalue of A if there exists a vector ~ x 6= 0 such that
A~x = λ ~x
In the direction ~x, A is a dilation of ratio λ. ~
x is called an eigenvector.
Definition (Symmetric matrices)
AT = A

Example:
 
3 1
 
3 1
−1
 3 1 2
nonsymmetric symmetric

Definition (Eigenvalue)
The real λ is an eigenvalue of A if there exists a vector ~ x 6= 0 such that
A~x = λ ~x
In the direction ~x, A is a dilation of ratio λ. ~
x is called an eigenvector.
Theorem
A symmetric matrix A has eigenvectors that form an orthogonal basis.

Denoting P the matrix whose columns are the eigenvectors (normalized), we


have:  
T λ1 0
P AP =
0 λ2
where λ1 and λ2 are the eigenvalues.
Ý Up to a change of orthogonal basis, A is a dilation in each directions.
Definition
The eigenvalues are the zeros of the characteristic polynomial
 
λ − A1,1 −A1,2
det(λId − A) = det
−A2,1 λ − A2,2
= (λ − A1,1 )(λ − A2,2 ) − A1,2 A2,1

 
2 1
Example: A = has the characteristic polynomial λ2 − 4λ + 3 whose
1 2
zeros are
λ1 = . . . , λ2 = . . .
Eigenvectors are given by    
1 −1
( , )
−1 1
Application
• vectors of size 3, inertia matrices
• phase space (position, velocity) : vectors of size 6
• matrices of correlation
• matrice of diffusion
• images : matrices of size n × n with n large

You might also like