Unit 2 - VZHK
Unit 2 - VZHK
The order of a matrix is the number of rows and columns that this matrix has .
If the matrix has m rows and n columns, the order of this matrix is mxn.
Concept of Matrix
a11 a12 a13 ... a1n
a21 a22 a23 ... a2 n
A a31 a32 a33 ... a3n
... ... ... ... ...
a
m1 am 2 am 3 ... amn
Where aij is the element found in row i and column j in the matrix A.
We represent the matrix as:
Two matrices A and B are equal if both are of the same order
and each element of A coincides with each element of B, that is;
the matrix equality is the vector equality of all rows (or columns)
Matrix types
A matrix is rectangular when the number of its rows does not coincide
with the number of its columns.
For example:
1 2 0.5 1 0
A 3 1 12 1.67 4
3 2
2 4 4
which has 3 rows and 5 columns
Matrix types
A row matrix is a matrix that has one row,
And a column matrix is the one that has one column
For example:
1
3
A B 0 1 0 1
2
2
A is a column matrix and B is a row matrix
Matrix types
A square matrix is the matrix that has
the same number of rows and columns.
If it has n rows and columns, is called square matrix of order n.
1 7 2 6
2 0 2 5
For example: A A is a square matrix of
0 1 2 3
order 4
3
8 3 4
Matrix types
The main diagonal of square matrix nxn is formed by elements aii
For example:
1 7 2 6
2 0 2 5
A
0 1 2 3 1, 0, 2 and 4 constitute the
3 main diagonal of the matrix A
8 3 4
Matrix types
A matrix is triangular superior if it is a square matrix which elements below
the main diagonal are equal to zero; that is, if aij=0, i>j.
1 7 2 6 3 0 0 0
0 0 2 5 2 3 0 0
For example: A B
0 0 2 3 0 1 1 0
0 4 3 2
0 0 8 3
If all elements of such a matrix are the same, this matrix is called a scalar matrix.
1 0 0 0 3 0 0 0 1 0 0 0
0 0 0 0 0 3 0 0 0 1 0 0
A B C
0 0 3 0 0
For example:
0 0 2 0 0 0 1
0 4 0 0 1
0 0 0 0 3 0 0
The sum of matrices Amxn and Bmxn (that must be of the same order)
is the matrix of order mxn,
such that its element (i,j) is the sum of elements (i,j) of A y B.
There is no way to define the sum of matrices which are of different order.
1 3 1 2 0 0 1 1 2 0
A B 1 1 1 1 8 2 1 1 1 0
3 2 5 0 0 1 1 2 1 2
1 2 2 0 0
3 2 2 2 8
2 1 3 1 2
Sum of Matrices
Let M mxn be the set of all real matrices of order mxn, then
Properties
2. Identity element: the matrix 0 of order mxn, such that all its elements are 0
where: A+0=A, AM mxn, 0 M mxn
3. Inverse element: given A Mmxn it is defined matrix –A=(-a ij)mxn where A+ (-A)=0
1 3 1 2 0 3 9 3 6 0
A 1 1 1 1 8 3 A 3 3 3 3 24
3 2 5 0 0 9 6 15 0
0
Scalar Multiplication
Properties of the product of a matrix by a scalar :
4. 1A=A , AMmxn
Matrix Multiplication
Any matrix can be multiplied by another matrix if and only if the number of
columns of one matrix is equal to the number of rows of the other matrix.
c ij a i1 , a i 2 , a i 3 ,...., a in b1 j , b2 j , b3 j ,...., bnj a ik bkj
n
1 2
1 1 3 0
A 0 1 , B
2 1 0 1 0 2
1 1 3 4
A B 0 1 0 2
2 3 6 2
Matrix Multiplication
1 2
1 1 3 0
A 0 1 , B
2 1 0 1 0 2
1 1 3 4
A B 0 1 0 2
2 3 6 2
Matrix Multiplication
Properties of matrix multiplication:
assuming that matrices A, B, and C are appropriate to perform the operations:
Given a matrix A aij mxn
, the transpose matrix of A is the matrix of
order nxm obtained from the matrix A by changing rows by columns.
2. asymmetric if it coincides with its transpose matrix changing the sign A=-At
2,2,42,1,1 2
2 2 4
2 2,2,4 2,3,2 2
C 1 3 4 C :
1 2,2,4 4,4,3 4
2 3
...
Matrix Trace
The trace of nxn square matrix is the sum of its diagonal elements
n
tr ( A) aii
i 1
1 7 2 6
2 0 2 5
A tr A 1 0 2 4 7
0 1 2 3
3
8 3 4
Matrix Trace - Properties
1. tr(In)=n.
2. tr(0)=0.
3. tr(A)=tr(At), AMnxn.
5. tr(A+B)=tr(A)+tr(B ), A,BMnxn
• There is only one element of each row and column in the product
1 1
A A 1 2 1 3 5
3 2
1 1 2 1 1 2
B 2 1 2 Sarrus’ rule: B 2 1 2
1 2 1 2 3
3
B 1 1 3 1 2 1 2 2 2 1 1 2 2 1 3 1 2 2 11
Determinant of a matrix – Properties
3. When changing the order of 2 rows (columns), the determinant changes the
sign: det 𝐴 = det 𝑅1 , 𝑅2 , 𝑅3 , … 𝑅𝑛 = −det 𝑅2 , 𝑅1 , 𝑅3 , … 𝑅𝑛 = 0
Determinant of a matrix – Properties
4. det(AB)=det(A) det(B)
Determinant of a matrix – Properties
10. The determinant of matrix A is equal to the determinant of any other matrix
which is obteined by summing matrix A rows (columns) a linear combination of
other rows (columns).
When the triangular matrix of the same determinant as the initial one is
achieved, we will be able to compute its determinant as the product of its
elements from the main diagonal.
Determinant calculus by Gaussian Elimination
For example:
1 1 2 3 1 1 2 3
2 0 2 5 2 0 2 5
A A
0 1 2 1 0 1 2 1
3 1 4
2 3 2 1 4
1 1 2 3
0 2 2 1 (2,0,2,5) - 2·(1,-1,2,3)
0 1 2 1
0 5 5 5 (3,2,1,4) - 3·(1,-1,2,3)
Determinant calculus by Gaussian Elimination
1 1 2 3 1 1 2 3
0 2 2 1 0 1 2 1
0 1 2 1 0 2 2 1
0 5 5 5 0 5 5 5
1 1 2 3
0 1 2 1
0 0 6 3 (0,2,-2,-1) - 2·(0,1,2,1)
0 0 15 10 (0,5,-5,-5) - 5·(0,1,2,1)
Determinant calculus by Gaussian Elimination
1 1 2 3 1 1 2 3
0 1 2 1 0 1 2 1
0 0 6 3 0 0 6 3
0 0 15 10 0 0 0 2.5 (0,0,-15,-10) -2’5·(0,0,-6,-3)
1 1 2 3
0 1 2 1
11 6 2.5 15 A 15
0 0 6 3
0 0 0 2.5
Determinant calculus by adjoint
• The complementary minor of the element a ij is the determinant that results
from getting rid of row i and column j (the row and column where a ij is found)
and is denoted as det( Aij )
n
It can be verified that det( A) a ij adj(a ij ) if the determinant is
i 1
developed by means of row element i
n
or det( A) aij adj(a ij ) by column element j.
j 1
Determinant calculus by adjoint
For example:
1 1 2 3 1 1 2 3
2 0 2 5 2 0 2 5
A A
0 1 2 1 0 1 2 1
3
2 1 4 3 2 1 4
0 2 5 2 2 5
adja11 1 1 adja12 1 1 1 10 10
11 1 2
2 1 19 0 2
2 1 4 3 1 4
2 0 5 2 0 2
adja13 1 0 adja14 1 2 1 12 12
1 3 1 4
1 1 11 0 1
3 2 4 3 2 1
Determinant calculus by adjoint
therefore,
1 1 2 3 1 1 2 3
2 0 2 5 2 0 2 5
A A
0 1 2 1 0 1 2 1
3
2 1 4 3 2 1 4
A 15
Inverse matrix
A
where Adj(A) denotes the adjoint matrix A that is the square nxn matrix,
where each element of the matrix A is sustituted by its adjoint
1
- The inverse of an invertible matrix A is denoted as A
Inverse matrix
For example,
2 3 2 3
A A 1
1 2 1 2
For example,
t
2 3 2 1
A Adj ( A)
1 1 1
A
t
1 2 A 1 3 2
1 2 3
A
1 2
2 3 2 3 2 3 2 3 1 0
1 2 1 2 1 2 1 2 0 1
Inverse matrix
Properties
1. A
1 1
A
2. AB 1
B A 1 1
3. A
t 1
A 1 t
Matrix relation
Let A and B be two square matrices of order n:
• A and B are called similar if there exists a regular matrix P, such that
1
A P BP
• A and B are called congruent if there exists a regular matrix P, such that
A P BPt
Orthogonal matrices
A square matrix A of order n is orthogonal if and only if AA A A I ,
t t
2 2 1 2 1 2
1 0 0
3 3 3 3 3 3
A 1 2 2 t 2
,A
2 1 A A 0 1 0
t
3 3 3 3
2
3
2 1
3
2
0 0 1
1
2
3 3 3 3 3 3 And hence, the inverse matrix
of A is its transpose matrix
Orthogonal matrices - Properties
1
1. A is orthogonal if and only if A A
t
1
5. If matrix C is orthogonal and A is symmetric, then C AC is symmetric
Matrix rank
For example:
3 2 3 1 1 3 2 3 1 1 2 1 0
2 1 1 1 0 2 1 1 1 0 B 1 2 1
A 5 2 0 1 0 5 2 0 1 0 2 2 2
1 1 0 2 1 1 1 0 2 1 B is the submatrix of A
2 3
2 2 2 2 3 2 2 2
2 1 0
B 1 2 1 4 Is a minor of order 3 of matrix A
2 2 2
Matrix rank
We start looking for a non null minor of order 2. If there is no non null minor
of order 2, the rank is 1
Matrix Rank calculus
• Starting from this non null minor, we form the minors of order 3, by adding
one row and one column to the minor of order 2 (to edge rows and
columns), untill we find a non null one.
• The convenient way to proceed is to add a row and check for all columns,
then, change the row and to edge all columns and so on.
•If we do not find any non null minor, the rank is of the order of the previous
minor.
•It is usefull to account for linear combinations between rows and columns.
We remove them, since we know that the determinant is equal to zero in
this case.
Matrix Rank
For example:
|a11| is a non null minor
1 2 2 5 1 2 2 5 of order 1. Then, the
rank is at least 1. Now
2 1 1 4
A rg A ¿? 2 1 1 4 we look for non null
1 0 1 1 1 minors of order 2.
0 1 1
2 2
1 1 4
1 1 4
we change the column 2
1 2 2 5 We add raw 2 and 1 2 2 5
column 2 to a11 by column 3
2 1 1 4 2 1 1 4
1 1 2 1 0 1 1
1 2
0
0 1 1
0
2 2 4
2 1
1 1 4 2 1 We look for 1 1 We look for
other minor
other minor
Matrix Rank
we change the column 3
1 2 2 5
by column 4
2 1 1 4 Therefore, there is at least one minor of order 2
1 0 1 1
1 5
6 0
different to 0 and the rank is at least equal to 2.
Now we look for any non null minor of oder 3
2 4
2 4 different to 0.
1 1