8/3/2019 Lec3 Linear Equations
1/30
8/3/2019 Lec3 Linear Equations
2/30
Determinant of a Matrix:
The determinant of a matrix is a scalar and is denoted as |A| or det(A). Thedeterminant has very important mathematical properties, but it is very
difficult to provide a substantive definition. For covariance and correlationmatrices, the determinant is a number that is sometimes used to expressthe generalizedvariance of the matrix. That is, covariance matrices withsmall determinants denote variables that are redundant or highlycorrelated. Matrices with large determinants denote variables that areindependent of one another.
A determinant of second order is denoted by
14)2*3()5*4(52
34
det21122211
2221
1211
aaaaaa
aaAD
8/3/2019 Lec3 Linear Equations
3/30
Determinant of a Matrix:
Third Order Determinant
7206
620
26
423
20
461
206
462
031
det
2322
1312
31
3332
1312
21
3332
2322
11
333231
232221
131211
D
aa
aaa
aa
aaa
aa
aaa
aaa
aaa
aaa
AD
8/3/2019 Lec3 Linear Equations
4/30
Determinant of a Matrix:
Determinant of any order
jnjnjjjj
rcrr
c
c
CaCaCaD
aaa
aaa
aaa
AD
...
...
............
...
...
det
2211
21
22221
11211
(j = 1,2,..,or n)
8/3/2019 Lec3 Linear Equations
5/30
Determinant of a Matrix:
General Properties of Determinantsa. Interchange of two rows multiplies tha value of the determinant by -1.b. Addition of multiple of a row to another row does not alter the value of
the determinant.
c. Multiplication of a row by c multiplies the value of the determinant by c.
d. Transposition leaves the value of a determinant unaltered.
e. A zero row or column renders the value of a determinant zero.
f. Proportional rows or columns render the value of a determinant zero. Inparticular, a determinant with two identical rows or column has the value zero.
8/3/2019 Lec3 Linear Equations
6/30
Cramers Method:
A method for solving a linear system of
equations using determinants. Cramers rule mayonly be used when the system is square and thecoefficient matrix is invertible.
x = D x / Dy = D y / D
http://www.mathwords.com/l/linear_system_of_equations.htmhttp://www.mathwords.com/l/linear_system_of_equations.htmhttp://www.mathwords.com/d/determinant.htmhttp://www.mathwords.com/s/square_system_of_equations.htmhttp://www.mathwords.com/c/coefficient_matrix.htmhttp://www.mathwords.com/i/invertible_matrix.htmhttp://www.mathwords.com/i/invertible_matrix.htmhttp://www.mathwords.com/c/coefficient_matrix.htmhttp://www.mathwords.com/s/square_system_of_equations.htmhttp://www.mathwords.com/d/determinant.htmhttp://www.mathwords.com/l/linear_system_of_equations.htmhttp://www.mathwords.com/l/linear_system_of_equations.htm8/3/2019 Lec3 Linear Equations
7/30
Solution to Systems of Linear EquationsA system of linear equation:
133
843
1524
321
321
321
xxx
xxx
xxx
Gaussian Elimination
A systematic method of eliminating the unknowns and solving the equationsby back-substitution
Makes use of the basic matrix operations such as row interchanges,elimination by addition or subtraction, scalar multiplication, etc.
8/3/2019 Lec3 Linear Equations
8/30
Solution to Systems of Linear Equations
rcrr
c
c
aaa
aaa
aaa
A
...
............
...
...
21
22221
11211
Transform the system of linear equations into its equivalent matrix form
A x = bA bwhereA an r x c matrix which is compose of the coefficients of the unknownsx vector of unknownsb vector of the sum of the products of the unknowns and its
corresponding coefficient
8/3/2019 Lec3 Linear Equations
9/30
Solution to Systems of Linear EquationsConsider the system of equations below
133
843
1524
321
321
321
xxx
xxxxxx
In Matrix notation
8/3/2019 Lec3 Linear Equations
10/30
Solution to Systems of Linear EquationsThe augmented matrix which is used in matrix operations is the combinationof the matrix of coefficients and vector of known.
138
15
34
1
1113
24
8/3/2019 Lec3 Linear Equations
11/30
Solution to Systems of Linear EquationsIn Gaussian elimination, the objective is to transform the matrix into an uppertriangular matrix by matrix operations
3
2
1
33
23
13
22
1211
00
0
b
b
b
a
a
a
a
aa
8/3/2019 Lec3 Linear Equations
12/30
Solution to Systems of Linear EquationsRow operation (subtraction)
To eliminate a21
122
1121
*
/
RfRR
aaf
133
1131
*
/
RfRR
aaf
To eliminate a31
8/3/2019 Lec3 Linear Equations
13/30
Solution to Systems of Linear EquationsThe last step in the Gaussian elimination is the back substitution.
3
2
1
33
23
13
22
1211
00
0
b
b
b
a
a
a
a
aa
3333
2323222
1312212111
00
0
bxa
bxaxa
bxaxaxa
11
2123131
1
22
32322
33
3
3
a
xaxabx
a
xabx
a
bx
8/3/2019 Lec3 Linear Equations
14/30
Solution to Systems of Linear EquationsGauss Elimination: The three Possible Cases of Systems
Infinitely many solutions exist
Ex. Solve the linear three equations in four unknowns:
1.24.23.03.02.1
7.24.55.15.16.0
0.80.50.20.20.3
4321
4321
4321
xxxx
xxxx
xxxx
1.2
7.2
0.8
4.2
4.5
0.5
3.0
5.1
0.2
3.02.1
5.16.0
0.20.3
1.1
1.1
0.8
4.4
4.4
0.5
1.1
1.1
0.2
1.10
1.10
0.20.3
Sol:
First Step. Elimination of x1from the second and thirdequations by adding
-0.6/3.0 times the first eq. to the second eq.-1.2/3.0 times the first eq. to the third eq.
This gives:
8/3/2019 Lec3 Linear Equations
15/30
Solution to Systems of Linear EquationsSecond Step. Elimination of x2 from the third equations by adding
1.1/1.1 times the second eq. to the third eq.
0
1.1
0.8
0
4.4
0.5
0
1.1
0.2
00
1.10
0.20.3
8/3/2019 Lec3 Linear Equations
16/30
Solution to Systems of Linear Equations
443
63
22
321
321
321
xxx
xxx
xxx
4
6
2
4
1
2
31
13
11
2
12
2
2
7
2
20
20
11
10
12
2
5
7
2
00
20
11
Solve the linear system
Sol:
First Step. Elimination of x1 from the second and third equationsgives
Second Step. Elimination of x2 from the third equation gives
Beginning with the last equation, we obtainsuccessively x3 = 2, x2 = -1, x1 = 1.
Gauss Elimination if a unique solution exist
8/3/2019 Lec3 Linear Equations
17/30
Solution to Systems of Linear EquationsGauss Elimination if no solution exist
6426
02
323
321
321
321
xxx
xxx
xxx
6
0
3
4
1
1
26
12
23
0
2
3
2
3/1
1
20
3/10
23
Sol:First Step. Elimination of x1 from the second and third equations
gives
Second Step. Elimination of x2 from the third equation gives
12
2
3
0
3/1
1
00
3/10
23
This shows that the system has nosolution
8/3/2019 Lec3 Linear Equations
18/30
Solution to Systems of Linear EquationsGauss Elimination. Partial pivoting
Solve the system
26826:
8253:
728:
3213
3212
321
xxxExxxE
xxE
728
8253
26826
32
321
321
xxxxx
xxx
7
5
29
2
2
8
80
40
26
7
8
26
2
2
8
80
53
26
Sol:We must pivot since E1 has no x1 term. In column 1, eq E3 has the largest
coefficient. Hence, we interchange E1 and E3.
Eliminate of x1 from the other equation gives
8/3/2019 Lec3 Linear Equations
19/30
The largest coefficient in column 2 is 8. Hence we take the new third equationas the pivot eq., interchanging eqs. 2 and 3,
Solution to Systems of Linear Equations
2/3
7
26
3
2
8
00
80
26
5
7
26
2
2
8
40
80
26
4
1
2
1
1
2
3
x
x
x
Eliminate x2
Back substitution yields,
8/3/2019 Lec3 Linear Equations
20/30
Consider a linear system.
Solution:
8/3/2019 Lec3 Linear Equations
21/30
8/3/2019 Lec3 Linear Equations
22/30
This is a triangular matrix. Its associated system is
Clearly we have v= 1. Set z=s and w=t, then wehave
The first equation implies
8/3/2019 Lec3 Linear Equations
23/30
Using algebraic manipulations, we get
Putting all the stuff together, we have
8/3/2019 Lec3 Linear Equations
24/30
2X1 3X2 + 4X3 = 3-X1 + 4X2 +3X3 = 11
4X1 + 6X2 5X3 = -8
8/3/2019 Lec3 Linear Equations
25/30
8/3/2019 Lec3 Linear Equations
26/30
8/3/2019 Lec3 Linear Equations
27/30
Gauss Jordan eliminates the backwardsubstitution..
8/3/2019 Lec3 Linear Equations
28/30
A matrix must be square to have an inverse, but not all square matrices
have an inverse. In some cases, the inverse does not exist. For covarianceand correlation matrices, an inverse will always exist, provided that thereare more subjects than there are variables and that every variable has avariance greater than 0.
Matrix Inverse:In scalar algebra, the inverse of a number is that number which, whenmultiplied by the original number, gives a product of 1. Hence, the inverse
of x is simple 1/x. or, inslightly different notation, x-1
. In matrix algebra,the inverse of a matrix is that matrixwhich, when multiplied by the originalmatrix, gives an identity matrix. The inverse of a matrix is denoted by thesuperscript -1. Hence, AA-1 = A-1A = I
rcrr
c
c
T
jk
aaa
aaa
aaa
AA
AA
...
........ ... .
...
...
det
1
det
1
21
22221
11211
1 where Ajk is the cofactorof ajk in det A.
8/3/2019 Lec3 Linear Equations
29/30
Matrix Inverse:
8
31
13
1341
13
7
43
11
10det
431
113
211
13
12
11
A
A
A
A
A
231
11
241
21
243
21
23
22
21
A
A
A
21311
713
21
311
21
23
32
31
A
A
A
2.02.08.0
7.02.03.1
3.02.07.0
1
A
8/3/2019 Lec3 Linear Equations
30/30
A civil engineer involved in construction requires 6000, 5000,and 8000 m3 of sand, gravel, and coarse gravel, respectively,for building project. There are three pits from which thesematerials can be obtained. The composition of these pits
How many cubic meters must be hauled from each pit inorder to meet the engineers needs? Use at least 2 from anymatrix method.
Sand% Fine Gravel% CoarseGravel%Pit 1 32 30 38Pit 2 25 40 35Pit 3 35 15 50