Notes Unit-I
Notes Unit-I
(COMP)
JSPM’s
RAJARSHI SHAHU COLLEGE OF ENGINEERING
TATHAWADE, PUNE-33
An Autonomous Institute Affiliated to SavitribaiPhule Pune University
Contents: Rank of a Matrix, System of Linear Equations, Linear Dependence and Independence,
Linear and Orthogonal Transformations, Application to problems in Engineering.
Definition (Matrix):An ordered set of elements arranged in a rectangular array of rows and n
columns and enclosed by a pair of brackets [ ] is called a matrix of order
a11 a12 ––
––
––
––
a1n
––
a21 a22 a2n
= –– –– –– ––
–– –– –– –– ––
am1 am2 –– –– amn
or where and .
1.2Types of Matrices :
1. Row matrix :A matrix is said to be row matrix in which only one row and any number of
columns.
e.g. A = [1 – 2 7 – 5 1]
2. Column matrix :A matrix is said to be column matrix in which only one column and any
– 26
number of rows. e.g. A=
0
–4
7
3. Null matrix :A matrix is said to be null matrix if all elements of matrix are zero.
00 00 00
It is denoted as O or Z. e.g. Z= 0 0 0
0 0 0
4. Transpose of a matrix :A matrix obtained from a given matrix A by interchanging rows and
columns is called transpose of A. It is denoted as A or A e.g. :
T
17 – 53 2
4
1
7 –1 2
= –1 –1
0 then A =
T
If A 5 –3 0
0
2 –1 –9 4 2 0 –9
e.g. A=[ ]
7. Scalar matrix:A diagonal matrix is said to be scalar matrix if all diagonal elements are equal.
a11 a12 a13
8. Determinant of the matrix : Determinant of a square matrix A= a21 a22 a23 is
a31 a32 a33
a11 a12 a13
| | a21 a22 a23 =
a31 a32 a33
9. Non-singular matrix :A square matrix is said to be non singular matrix if |A| 0. Otherwise
it is said to be singular matrix.
T
10. Symmetric matrix : A square matrix is said to be symmetric matrix if A = A
a h g a h g
a. e.g. : A = h b f T h b f
and A =
g f c g f c
11. Skew Symmetric matrix :A square matrix is said to be Skew symmetric matrix if
12. Unit (Identity) matrix :A square matrix is said to be unit matrix if all diagonal (leading)
elements are unity and allnon diagonal elements are zeros. If unit matrix of order n, it is
denoted as In
1 0 0
0 ; I2 =
0
e.g. :I3= 0
1
1
0 1
0 0 1
13. Upper triangular matrix :A square matrix is said to be upper triangular matrix if all
elements below leading (principal) diagonal are zeros.
e.g.[ ] [ ]
14. Lower triangular matrix :A square matrix is said to be lower triangular matrix if all
elements above leading (principal) diagonal are zeros.
e.g.:[ ] [ ]
a22 a23
Minor of an element a11=M11 = a a33
32
a21 a23
Minor of an element a12=M12 = a a33 etc.
31
e.g. [ ] [ ]
Adj [ ].
18. Inverse of a matrix:If is a square matrix and | | i.e. is a non-singular matrix then
| |
Adj .
1.3Rank of a matrix:
Definition (Rank of Matrix): The rank of matrix is defined as the highest order of its
nonvanishing minor and it is denoted as .
i. The first row of has the first non zero element equal to one (Leading one)
ii. Leading one of every row lies to the right of leading one of the previous row
iii. Below every leading one all elements are zero
iv. Rows of zero element is/are at the bottom of matrix
7 –9
1
5 2
e.g.: A =
0 0 1 –2 5
0 0 0 0 1
0 0 0 0 0
Example 1.Find the rank of the following matrix by reducing it to Echelon form
–1 –1
21 3
–1 –2 –4
A= 3 1 3 –2
6 3 0 –7
–1 –1
21 3
–1 –2 –4
Solution.: Given matrix is, A= 3 1 3 –2
6 3 0 –7
Applying R12
12 – 13 –– 21 –4
–1
3 1 3 –2
6 3 0 –7
Applying R2 – 2R1 ; R3 – 3R1 ; R4 – 6R1
–1 –2 –4
10 5 3 7
0 4 9 10
0 9 12 17
Applying R2– R3
10 – 11 –– 26 –4
–3
0 4 9 10
0 9 12 17
Applying R3 – 4R2 ; R4 – 9R2
10 – 11 –– 26 –4
–3
0 0 1 2/3
0 0 0 0
Which is Echelon form of Matrix A. Therefore rank of matrix A, (A)=Total number of rows –
Number of rows containing all zeros =4 – 1=3.
–1 –3
14 1
2
0 2
Example 2 : Find the rank of matrix 0 3 1 4 by Echelon form
0 1 0 2
–1 –3
14 1
2
0 2
Solution. : Given matrix is, A= 0 3 1 4
0 1 0 2
Applying R2 – 4R1
–1 –3
10 5
2
–8 14
0 3 1 4
0 1 0 2
Applying R24
–1 –3
10 1
2
0 2
0 3 1 4
0 5 –8 14
Applying R3 – 3R2 ; R4 – 5R2
–1
10 1
2
0 2
3
0 0 1 –2
0 0 –8 4
Applying R4 + 8R3
–1
10 1
2
0 2
3
0 0 1 –2
0 0 0 – 12
This is echelon form of matrix A. (A)=4 – 0 = 4
Exercise :
2 2 0 6
4 2 0 2
iii
Ans: A 3 (iv)[ ]Ans : A 3.
1 1 0 3
1 2 1 2
3 –1 2
(v) – 6 2 4 Ans. = 2 (vi)[ ]
– 3 1 2
. . .
Where, A = , X = ,B=
[ ] [ ] [ ]
[ ]
If the system has some solution (unique or infinitely many) then it is said to be consistent, otherwise
inconsistent.
(ii) If the system has infinitely many solutions and unknowns can be expressed
as linear combination ofremaining – unknowns.
Since the | the system is always consistent i.e. the system has always a solution,
This solution is , i.e. , is called trivial solution.
If | , and
(ii) If the system have infinite many solutions and r unknowns can be expressed as a
linear combination of remaining – unknowns.
Note: If is a matrix then of the system then | | implies the system has
nontrivial solution and | | implies the system has trivial solution.
12 1
–1 3
1
x
y ; B = 1
3
This system can be written as, where = 4 1 5; X = 2
3 –2 1
z 4
Consider
| 1 1 1 3
2 –1 3 1
4 1 5 2
3 –2 1 4
Operate ; ;
1 1 1 3
0 –3 1 –5
Applying
1 1 1 3
0 5 2 5
0 3 1 10
0 3 1 5
Operate
1 1 1 3
0 1 4 15
0 3 1 10
0 3 1 5
Operate
1 1 1 3
0 1 4 15
0 0 11 35
0 0 11 40
Operate ;
1 1 3
1
0 1 15
4
0 0 11 35
0 0 0 5
This shows that (A) =3 and (A|B)=4 (A) (A|B). Hence system is inconsistence
– –
– –
This system can be written as AX=B
1 –1 – 1 x 2
Where A= 1 2 1 ; X = y ; B = 2
4 –7 – 5 z 2
Consider, [A|B]
1 –1 –1 2
1 –1 –1 2
0 3 2 0
0 0 1 –6
Example 3 : Examine for the following system of equations for consistency and if consistent then
solve it : – – –
–
–
–
2 –3 5 1
Consider, [A|B] = 3 1 –1 2
1 4 –6 1
Operate,
1 4 –6 1
3 1 –1 2
2 –3 5 1
Operate, ; ; ;
1 4 -6 1
0 -11 17 -1
0 -11 17 -1
Operate, ;
1 4 -6 1
Exercise
Q.Examine the following systems for the consistency and solve if consistent.
(i) 2x + y – z + 3w = 8 ; x + y + z – w = – 2 ; 3x + 2y – z = 6 ; 4y + 3z + 2w = – 8
(ii) 2x – y – z = 2 ;x + 2y + z = 2 ; 4x – 7y – 5z = 2.
(iii)
(Ans.: )
–
have (i) No Solution (ii) Unique Solution (iii) An infinite number of solutions.
–
2 3 5 x 9
We can write this in the form, AX=B, where A= 7 3 –2 ; X= y ;B= 8
2 3 z
2 3 5 9
[A|B] = 7 3 –2 8
2 3
Operate ,
7 3 –2 –8
2 3 5 9
2 3
Operate ;
1 –6 – 17 – 19
2 3 5 9
2 3
Operate ; ;
3 4 5 x
It can be written in matrix form as,AX=Bwhere, A=4 5 6;
X=y ; B=
5 6 7 z
Consider, 3 4 5
[A|B] = 4 5 6
5 6 7
Operate
4 5 6
~ 3 4 5
5 6 7
Operate
1 1 1 –
~ 3 4 5
5 6 7
Operate ;
1 1 1 –
~ 0 1 2 4 – 3
0 1 2 5 – 5 +
Operate
1 1 1 –
~ 0 1 2 4 – 3
1 1 1 x 1
It can be written in matrix form as,AX =B, where,A=2 1 4 ;X=
y ; B = k
4 1 10 z k^2
1 1 1 1
[A|B] = 2 1 4
4 1 10
Operate ;
1 –1 1 1
~ 0 –1 2 –2
0 –3 6 –4
Operate
1 1 1 1
~ 0 –1 2 k–2
0 0 0
Exercise:
Has (i) no solution (ii) unique solution (iii) infinite number of solutions. Find the
solutions in case (ii) and (iii).
Ans.: (i) no solution for
(ii)Unique solution for any value,
(iii) infinitely many solutions for .
Has (i) no solution (ii) unique solution (iii) infinite number of solutions
Ans.: (i) no solution for
(ii)Unique solution for any value,
(iii) infinitely many solutions for .
Since | , the system is always consistent i.e. the system has always a solution,
If | , and
Example 1: Examine the following set of equations for non-trivial solution and solve them :
5 2 –3 x 0
It can be written as, AX =0,Where A= 3 1 1 ;
X= y ; 0= 0
2 1 6 z 0
Consider,
1 2 –3 0
[A | 0] = 3 1 1 0
2 1 6 0
Operate R1 – 2R3
1 0 – 15 0
3 1 1 0
2 1 6 0
Operate R2 – 3R1 ; R3 – 2R1
1 0 – 15 0
0 1 46 0
0 1 36 0
Consider,
1 2 –1 0
[A | Z] = 3 k+7 –3 0
2 4 k–3 0
Operate, and
1 2 –1 0
0 k+1 0 0 …(1)
0 0 k–1 0
k+1=0 or k – 1 = 0 i.e. k = – 1, or k = 1
Exercice:
has (i) trivial solution (ii) non-trivial solution. Find the non-trivial
solution. Ans.: (i) for , (ii) for ,
(ii) Solve the following:
. Ans.: .
2
3
-4 . Ans.: Trivial solution
Solution is, x = 1 , y = – 2, z = 3
Ex. : Use Gauss elimination method with partial pivoting to solve the following system of linear
equations
8 x2 + 2 x3 = – 7 ; 3 x1 + 5 x2 + 2 x3 = 8 ; 6 x1 + 2 x2 + 8 x3 = 26
Soln. : Given system of equations,
8 x2 + 2 x3 = – 7 …(1)
3 x1 + 5 x2 + 2 x3 = 8 …(2)
6 x1 + 2 x2 + 8 x3 = 26 …(3)
Step I : Since in Equation (1), x1 term is absent
by partial pivoting method, interchange Equation (1) with Equation (3), since in Equation
(3) coefficient of x1 numerically large.
6 x1 + 2 x2 + 8 x3 = 26 …(4)
3 x1 + 5 x2 + 2 x3 = 8 …(5)
8 x2 + 2 x3 = – 7 …(6)
Step II : Divide Equation (4) by 6
1 4 13
x1 + x2 + x3 = …(7)
3 3 3
Eliminate x1 from Equations (5) by using Equation (7), i.e. Equation (5) –
4 x2 – 2 x 3 = – 5 …(8)
8 x2 – 2 x 3 = – 7 …(9)
Since coefficient of x2 is large in Equation (9)
Rearrange Equations (8) and (9)
8 x2 + 2 x3 = – 7 …(10)
4 x2 – 2 x 3 = – 5 …(11)
Step III : Divide Equation (10) by 8
1 –7
x2 + 4 x3 = 8 …(12)
Now eliminate x2 from Equation (11) i.e. [Equation (11) – 4 Equation (12)]
–3
– 3 x3 = 2 …(13)
Step IV : From Equations (7), (12) and (13) by back substitution, it gives,
1
x3 = 2
–7 1
x2 = 8 – 4 x3 x2 = – 1
13 1 4
x1 = 3 – 3 x2 – 3 x3 x1 = 4
Ex. : Use Gauss elimination method to solve the following system of equations.
x1 + 4 x2 – x3 = – 5 ; x1 + x2 – 6 x3 = – 12 ; 3 x1 – x2 – x3 = 4
Soln. : Given system of equations,
x1 + 4 x2 – x3 = – 5 …(1)
x1 + x2 – 6 x3 = – 12 …(2)
3 x1 – x2 – x3 = 4 …(3)
Step I : Eliminate x1 from Equations (2) and (3) using Equation (1)
i.e. [Equation (2) – Equation (1)]; [Equation (3) – 3 Equation (1)]
– 3 x2 – 5 x3 = – 7 …(4)
– 13 x2 + 2 x3 = 19 …(5)
Step II : Divide Equations (4) by – 3
5 7
x2 + 3 x3 = 3 …(6)
Now eliminate x2 from Equation (5) i.e. [Equation (5) + 13 Equation (6)]
71 148
x 3 = …(7)
3 3
Step III : Now find values of x1, x2, x3 from Equations (1), (6) and (7) by back substitution.
148
It gives, x3 = 71
7 5 – 81
x2 = 3 – 3 x3 x2 = 71
117
x1 = – 5 – 4 x2 + x3 x1 = 71
117 – 81 148
Solution is,x1 = 71 , x2 = 71 , x3 = 71
Solution is,x1 = 7, x2 = – 9, x3 = 5
1 –1
Solution is, x1 = 1, x2 = 2, x3 = 2
3 1 –1 3
– 26 5
0 –7
3 3
–7 28
0 7
3 8
26
Now choose – 3 as the pivot from the second column,
7
Operate R3 – 26 R2
3 1 –1 3
– 26 5
0 –7
3 3
693 231
0 0
78 26
It gives, 3x + y – z = 3,
26 5 693 231
– 3 y+3z = –7 and z =
78 26
z = 1,
Solution is x = 1, y = 1, z = 1
1.8 Method of Factorization or Triangularization :
Consider the following system of equations :
a11 x1 + a12 x2 + a13 x3 = b1
a21 x1 + a22 x2 + a23 x3 = b2
a31 x1 + a32 x2 + a33 x3 = b3
We can write in matrix form as AX = B …(7)
a11 a12 a13
x1 b1
Where A = a21 a22 a23 , X = x2 and B = b2
a31
a32 a33 x3 b3
In this method we use the fact that the square matrix A can be factorized into the form LU,
where L is a unit lower triangular matrix and U, an upper triangular matrix if all the minors of A are
non-singular.
Consider, A = LU …(8)
1 0 0
u11 u12 u13
Where L = l21 1 0 and U= 0 u22 u23
l31 l32 1 0 0 u33
Now find L and U from LU = A, i.e.
1 0 0
u11 u12 u13
a11 a12 a13
l21 1 0 0 u22 u23 = a21 a22 a23
l31 l32 1 0 0 u33 a31 a32 a33
1 0 0 2 – 3 10
1
5
–2 1 0
L = and U = 0 2 7
5 19 253
1 0 0 – 5
2 5
Step III : From equations (1) and (2) we can write,
z1
put UX = Z, where Z = z2 , …(3)
z3
then LZ = B, LUX = B
1 z
1 0 0
–2 0 3
1
1
i.e. z = 20
5 z
2
– 12
2 19
5 1 3
1 5 19
z1 = 3 ; – 2 z1 + z2 = 20 ; 2 z1 + 5 z2 + z3 = – 12
43 506
z1 = 3, z2 = 2 z3 = – 5
Step IV : Now from equation (3)
1 1 4
0 0 z
0 1 0 z2 = – 2
1 0 1 z3 1
z1 = 4, z2 = – 2
and z1 + z3= 1 z3 = 1 – z1 = 1 – 4 = – 3
Step IV : From equation (3)
1 3 8 x
z1
and 0 1 –5 y = z2
0 0 – 4 z z3
x + 3y + 8z = 4
y – 5z = – 2
– 4z = – 3
By back substitution,
3
z =
4
3 7
y = – 4 + 5z = – 2 + 5 4 = 4
7 3 29
and x = 4 – 3y – 8x = 4 – 3 4 – 8 4 = 4
29 7 3
x = – 4 , y=4, z=4
a1 b1 c1
x
d1
Where, A =
a2 b2 c2 , X =
y and D=
d2
a3 b3 c3 z d3
st
In this method eliminate x from last two equations using I equation.
st rd nd
Then eliminate y from I and III equations by using II equation.
rd st nd
And using III equation eliminate z from I and II equations [i.e. diagonally]
From these equations by back we can find unknowns x, y, z.
Also, we can use matrix method
Given Equations write in the matrix form
AX = D
Consider augmented matrix [A | D]
By row transformation convert matrix A into identity matrix I,
It gives, [I | D1]
By back substitution we can find unknowns x, y, z.
Examples Based on Gauss Jordan Method :
Ex.: Solved the following system of equations using Gauss-Jordan method :
x1 + 2x2 + x3 = 8 ; 2x1 + 3x2 + 4x3 = 20 ; 4x1 + 3x2 + 2x3 = 16
Cholesky’s Method :
Given system of equations write in the form
AX = D ---(12)
a1 b1 c1
x
d1
Where, A =
a2 b2 c2 , X =
y and D =
d2
a3 b3 c3 z d3
Step I :
T T
Consider, A = LL or A = UU
l11 0 0
u11 u12 u13
Where L – Lower triangular matrix
= L =
l21 l22 0 U = 0 u22 u23
U – Upper triangular Matrix
l31 l32 l33 0 0 u33
T
Find L by A = LL
a1 b1 c1
l11 0 0
l11 l21 l31
i.e.
a2 b2 c2 =
l21 l22 0 0 l22 l32
a3 b3 c3
l31 l32 l33 0 0 l33
Then Equation (12) becomes,
T
LL X = D ...( 13)
T
Put L X = Z ...( 14)
3 0 0
3 2 4
L = 2 3 0 and LT = 0 3 1
4 1 3 0 0 3
Step III : Since from Equations (1) and (2)
T
LL X = B …(3)
T
Put L X = Z …(4)
Equation (3) as LZ = B
3 0 0
z1 17.4
2 3 0 = z2 = 23.6
4 1 3 z3 30.8
17.43z1 =
2z1 + 3z2
23.6 =
4z1 + z2 + 3z3
30.8 =
5.8, z1 =
1
z2 = 3 [23.6 – 2z1] z2 = 4
1
z3 = 3 [30.8 – 4z1 – z2] z3 = 1.2
z1 = 5.8, z2 = 4 z3 = 1.2
Step IV : Now, from Equation (4),
3 2 4 x1 5.8
0 3 1 x2 = 4
0 0 3 x3 1.2
3x1 + 2x2 + 4x3 = 5.8
3x2 + x3 = 4
3x3 = 1.2
By back substitution, 3x3 = 1.2 x3 = 0.4
1
3x3 + x3 = 4 x2 = 3 [4 – x3] x2 = 1.2
1
3x1 + 2x2 + 4x3 = 5.8 x1 = 3 [5.8 – 2x2 – 4x3] x1 = 0.6
0.3162 – 0.6325 x3
1.5811 x2 + 0.6325 x3 = 0.3162 x2 = x2 = 0.25
1.5811
0.7071 + 0.7071 x2
1.4142 x1 – 0.7071 x2 = 0.7071 x1 = x1 = 0.6250
1.4142
Hence solution is, x1 = 0.6250, x2 = 0.25, x3 = – 0.1250
42 22 43 02 xx1 18
10
Where, A = 4 3 6 3, X = x
2 B = 30
0 2 3 9 3 61
x4
Step I :
T T
Consider, A = LL i.e. LL = A …(2)
Where L is lower triangular matrix,
l l22 0 0 l011 ll21 ll31 ll41 42 22 43 02
l11 0 0 0
l
21 22 32 42
=4 3 6 3
31 l l 0 0 0 l l 43
l41 l42 l43 l44 0 0 0 l44 0 2 3 9
32 33 33
2
l11 l11 l21 l11 l31 l11 l41
l21 l11 l21 + l22
2 2
l l
21 31 + l l
22 32 l 21 41 + l22 l42
l
l31 l11 l31 l21 + l32 l22 33 43
2 2 2
l31 + l32 + l33 l l
31 41 + l l
32 42 + l l
l41 l11 l41 l21 + l42 l22 l41 l31 + l42 l32 + l43 l33 l412 + l422 + l432 + l442
42 22 4
3 2
0
=4 3 6 3
0 2 3 9
21 0
1 0 0
0 0
20 11 2
1 2
0
L = 2 1 1 0 and L = 0 0
T
1 1
0 2 1 2 0 0 0 2
…(3)
Step III : From Equations (1) and (2) we can write,
T
LL X = B …(4)
T
Put L X = Z …(5)
LZ = B …(6)
21 01 00 00 z12
z
10
18
2 1 1 0 z = 30
0 2 1 2 z4 3
61
2 z1 = 10
z1 + z2 = 18
2 z1 + z2 + z3 = 30
2 z2 + z3 + 2 z4 = 61
By forward substitution,
10
z1 = 2 z1 = 5 z1 = 5
z2 = 18 – z1 z2 = 13 z2 = 13
z3 = 30 – 2 z1 – z2 z3 = 7 z3 = 7
61 – 2 z1 – z3
z4 = z4 = 14 z4 = 14
2
Step IV : Substitute these values in Equation (5)
20 11 21 02 x12 135
x
0 0 1 1 x = 7
3
0 0 0 2 x4 14
2 x1 + x2 + 2 x3 = 5
x2 + x3 + 2 x4 = 13
Exercise