Big File
Big File
University of Ferrara
1 Basics
2 Matrix operations
3 Determinant of a matrix
4 Inverse matrix
5 Eigenvalues of a matrix
1 Basics
2 Matrix operations
3 Determinant of a matrix
4 Inverse matrix
5 Eigenvalues of a matrix
1 Basics
2 Matrix operations
3 Determinant of a matrix
4 Inverse matrix
5 Eigenvalues of a matrix
1 Basics
2 Matrix operations
3 Determinant of a matrix
4 Inverse matrix
5 Eigenvalues of a matrix
1 Basics
2 Matrix operations
3 Determinant of a matrix
4 Inverse matrix
5 Eigenvalues of a matrix
Part I
Definition
A matrix is an m × n array of m · n scalars from R. The individual values
in the matrix are called entries.
Examples:
2 −1 3 1 2
A= B=
1 4 −2 3 4
The size of the array is written as m × n, where
m is the number of rows
n is the number of columns
Notation:
a11 a12 ... a1n
a21 a22 ... a2n
A= .. .. ..
. . .
am1 am2 ... amn
aij := the entry on the row i and on the column j
Matrices and Linear Algebra
Basics
Matrix operations
Determinant of a matrix
Inverse matrix
Eigenvalues of a matrix
Specific cases
A matrix with dimension 1 × n is called row vector:
x = (x1 , x2 , . . . , xn )
A matrix with dimension m × 1 is called column vector or simply vector:
y1
y2
y= .
..
ym
A unit vector is a vector of ones:
1
1
..
.
1
Special matrices
If m = n, the matrix is called square. In this case we have:
A matrix A is said to be diagonal if
aij = 0 for i 6= j
A diagonal matrix A may be denoted by diag (d1 , d2 , . . . , dn )
where
aii = di and aij = 0 for i 6= j.
The diagonal matrix diag (1, 1, . . . , 1) is called the identity matrix
and is usually denoted by
1 0 ... 0
0 1
I = .
.. . ..
0 1
The diagonal matrix O = diag (0, . . . , 0) is called the zero matrix.
Matrices and Linear Algebra
Basics
Matrix operations
Determinant of a matrix
Inverse matrix
Eigenvalues of a matrix
that is
l11 0 ... 0
l21 l22
L= .. ..
..
. . .
ln1 ln2 ... lnn
A square matrix U is said to be upper triangular if
that is
u11 u12 ... u1n
0 u22 u2n
U= ..
..
. .
unn
Matrices and Linear Algebra
Basics
Matrix operations
Determinant of a matrix
Inverse matrix
Eigenvalues of a matrix
Definition
Let A be an m × n matrix.
Define the transpose of A, denoted by AT , to be the n × m matrix (i.e.
n rows and m columns) with entries
In other words:
a11 a12 ... a1n a11 a21 ... am1
a21 a22 ... a2n a12 a22 ... am2
A= . .. .. AT = .. .. ..
..
. . . . .
am1 am2 ... amn a1n a2n ... amn
Examples:
2 1
2 −1 3
A= AT = −1 4
1 4 −2
3 −2
1 2 T 1 3
B= B =
3 4 2 4
We have that
(AT )T = A
aij = aji
that is
AT = A
Example: The matrix
0 1 2
A= 1 −1 −4
2 −4 0
is symmetric.
Two matrices A and B are equal if and only if they have the same size
and
aij = bij for all i, j.
If A and B are matrices of the same size then the sum of A and B is
defined by C = A + B, where
Examples
2 1 6 −1.5 8 −0.5
−3 4 + 0 1 = −3 5
7 0 1 π 8 π
1 2 −3 −6
−3 =
3 4 −9 −12
hx, yi = x1 y1 + x2 y2 + · · · + xn yn
Matrix product
that means
Example:
2 1
1 0 1
A= B= 3 0
3 2 1
−1 1
Set C = AB, then
We obtain
1 2
D = AB =
11 4
Example: Let
1 0 0 0
A= B=
0 0 0 1
It happens that
0 0
AB =
0 0
but
0 0
A 6=
0 0
and
0 0
B 6=
0 0
Assume A, B, and C are matrices for which all products below make
sense. Then
A(BC ) = (AB)C (associativity)
A(B + C ) = AB + AC and (A + B)C = AC + BC
AI = A and IA = A
α(AB) = (αA)B
AO = O and OB = O
(AB)T = B T AT
Consider a 2 × 2 matrix
a11 a12
A=
a21 a22
Example:
1 2
A=
3 4
det(A) = 1 · 4 − 2 · 3 = −2
The same rule may be carried out by selecting any row or column of A:
det(A) = ai1 ·(−1)i+1 det(Ai1 )+ai2 ·(−1)i+2 det(Ai2 )+ai3 ·(−1)i+3 det(Ai3 )
det(A) = a1j ·(−1)1+j det(A1j )+a2j ·(−1)2+j det(A2j )+a3j ·(−1)3+j det(A3j )
where Aij is the submatrix obtained from A after deleting the i−th row
and the j−th column of A itself.
Then we have
−1 4 3 4 3 −1
det(A) = 1 · det − 2 · det + 1 · det
−2 1 1 1 1 −2
It follows that
Aij is the submatrix obtained from A after deleting the i−th row and the
j−th column of A itself.
n n
X XMatrices and Linear Algebra
Basics
Matrix operations
Determinant of a matrix
Inverse matrix
Eigenvalues of a matrix
det(B) = − det(A)
det(A) = 0
det(A) = 0
det(B) = det(A)
det(AT ) = det(A)
det(AB) = det(A) · det(B)
det(αA) = αn det(A)
If A = diag (d1 , d2 , . . . , dn ), then det(A) = d1 · d2 . . . dn .
It follows that
det(I ) = 1 · 1 . . . 1 = 1
Definition
A−1 inverse of A.
Then
AA−1 = A−1 A = I
Consider n = 2 and
a11 a12
A=
a21 a22
Assume that det(A) 6= 0. Then A is invertible and
−1 1 a22 −a12
A =
det(A) −a21 a11
Example:
2 −1
A= det(A) = 10
4 3
3 1
−1 1 3 1 10 10
A = =
10 −4 2 − 52 15
is equivalent to
Ax = b
with
3 2 1
A= b=
4 3 −2
We have det(A) = 1 6= 0, then A is invertible and
3 −2
A−1 =
−4 3
The solution of Ax = b is
−1 3 −2 1 7
x=A b= =
−4 3 −2 −10
Definition
If a vector v 6= 0 satisfies the equation
Av = λv,
for some scalar λ, then λ is said to be an eigenvalue of the matrix A, and
v is said to be an eigenvector of A corresponding to the eigenvalue λ.
Example: If
2 3
A=
3 2
and
1
v=
1
then
5 1
Av = =5 = 5v
5 1
So λ = 5 is an eigenvalue of A and v is an eigenvector corresponding to
this eigenvalue.
Matrices and Linear Algebra
Basics
Matrix operations
Determinant of a matrix
Inverse matrix
Eigenvalues of a matrix
Example: If
1 1
A=
3 3
and
1
v=
−1
then
0
Av = = 0v
0
So λ = 0 is an eigenvalue of A and v 6= 0 is an eigenvector corresponding
to this eigenvalue.
Then:
λ is an eigenvalue of A ⇔ det(A − λI ) = 0
An example
Consider
1 3
A=
3 1
Then
1−λ 3
A − λI =
3 1−λ
and
p(λ) = det(A − λI ) = (1 − λ)2 − 9 = λ2 − 2λ − 8 = (λ − 4)(λ + 2)
From p(λ) = 0 we obtain that λ1 = 4 and λ2 = −2 are the eigenvalues
of A.
It is equivalent to
−3 3 v1 0
=
3 −3 v2 0
This leads to the two equations −3v1 + 3v2 = 0 and 3v1 − 3v2 = 0.
Notice that the first equation is a multiple of the second one, so there is
really only one equation to solve
3v1 − 3v2 = 0
v1 = v2 = c
Conclusion: