AI-ML Class-03

You might also like

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

Special Matrices

Stochastic Matrix: A square matrix of order n is said to be stochastic


matrix if the entries are non-negative and the sum of the entries in each
column is 1.
Example
 
0.85 0.03
P= 
0.15 0.97

Dr. Sabitha D’Souza August 24, 2022 1 / 12


Identity matrix:

For each positive integer n, the n × n identity matrix In is the matrix of


order n whose respective columns are the standard vectors e1 , e2 , . . . , en in
R n.
Example
 
1 0 0 ... 0
 
0 1 0 . . . 0
 
 
In = 0 0 1 . . . 0
 
 .. .. .. .. 
 
. . . . . . .
 
0 0 0 ... 1

Dr. Sabitha D’Souza August 24, 2022 2 / 12


Rotation matrix

Consider a point P0 = (x0 , y0 ) in R 2 with polar co-ordinates (r , α); r ≥ 0


and α is the angle between OP0 and the positive X axis.
x0 = rcosα, y0 = rsinα
Suppose OP0 is rotated by an angle θ to the segment OP1 , where
P1 = (x1 , y1 ).
Then (r , α + θ) denotes the polar co-ordinates for P1 .
Dr. Sabitha D’Souza August 24, 2022 3 / 12
Hence
x1 = rcos(α + θ) = r [cosαcosθ − sinαsinθ]

= (rcosα)cosθ − (rsinα)sinθ

= x0 cosθ − y0 sinθ

Similarly we obtain
y1 = x0 sinθ + y0 cosθ
Dr. Sabitha D’Souza August 24, 2022 4 / 12
x1 = x0 cosθ − y0 sinθ

y1 = x0 sinθ + y0 cosθ

If  
cosθ −sinθ
Aθ =  
sinθ cosθ
Then       
x0 cosθ −sinθ x x
Aθ   =    0 =  1
y0 sinθ cosθ y0 y1
We call Aθ the θ-rotation matrix or a rotation matrix.

Dr. Sabitha D’Souza August 24, 2022 5 / 12


Note: For any vector u, Aθ u is the vector obtained by rotating u by an
angle θ, where the rotation is counterclockwise if θ > 0, and clockwise if
θ < 0. A00 = I2

Dr. Sabitha D’Souza August 24, 2022 6 / 12


Problems

 
3
i Compute A300  
4
      √ 
3 0
cos 30 − sin 30 0 3 3 3−4
A300   =    = 1  √ 
0 0 2
4 sin 30 cos 30 4 3+4 3
 
2
ii Compute Aθ if u = θ = 1350 , u =  
−1
 
−2
iii θ = 2700 , u =  
3

Dr. Sabitha D’Souza August 24, 2022 7 / 12


Properties of Matrix-Vector products

Let A and B be m × n matrices, and let u and v be vectors in R n . Then


• A(u + v ) = Au + Bv

• A(cu) = c(Au) = (cA)u for every scalar c

• (A + B)u = Au + Bu

• Aej = aj for j = 1, 2, . . . , n and ej is the j th standard vector in R n

• If Bw = Aw for all w in R n then B = A

• A0 is the m × 1 zero vector

• If 0 is the m × n zero matrix, then Ov is the m × 1 zero vector

• In v = v
Dr. Sabitha D’Souza August 24, 2022 8 / 12
System of Equations

A linear equation in n variables x1 , x2 , . . . , xn is an equation that can be


written as a1 x1 + a2 x2 = . . . + an xn = b where b and the coefficients
a1 , a2 , . . . , an are real or complex numbers.
Example
4x1 − 5x2 + 2x3 = −2 is linear

4x1 − 5x2 = x1 x2 and x2 = 2 x1 − 6 are not linear

A system of linear equations (linear system) is a collection of one or more


linear equations involving the same variables say x1 , x2 , . . . , xn .

Dr. Sabitha D’Souza August 24, 2022 9 / 12


Example
2x1 − x2 + 3x3 = 8
x1 − 5x3 = −7

A system of linear equations is a set of m linear equations in the same n


variables, where m and n are positive integers.
a11 x1 + a12 x2 + . . . + a1n xn = b1
a21 x1 + a22 x2 + . . . + a2n xn = b2
..
.
am1 x1 + am2 x2 + . . . + amn xn = bm
where aij denotes the coefficient of xj in equation i.

Dr. Sabitha D’Souza August 24, 2022 10 / 12


A solution of a system of linear equations in the variables x1 , x2 , . . . , xn is a
vector [s1 , s2 , . . . , sn ]T in R n such that every equation in the system is
satisfied when each xi is replaced by si .
The set of all solutions of a system of linear equations is called the
solution set of that system.

Dr. Sabitha D’Souza August 24, 2022 11 / 12


1. Determine whether u = [−2 3 2 1]T is a solution of the system of linear
equations.
x1 + 5x3 − x4 = 7
2x1 − x2 + 6x3 = 8
−2 + 10 − 1 = 7; −4 − 3 + 12 ̸= 8
Not a solution.
Whereas, v = [5 8 1 3]T is a solution.
5+5−3=7
10 − 8 + 6 = 8

Dr. Sabitha D’Souza August 24, 2022 12 / 12

You might also like