Basics in Maths: Laurent Navoret Laurent - Navoret@
Basics in Maths: Laurent Navoret Laurent - Navoret@
Laurent Navoret
laurent.navoret@math.unistra.fr
3x + y = 4
−x + 2 y = 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.
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
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
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.
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
•
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
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
∀~
x, ~
y, x·~
~ x · A~
y = A~ y
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.
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