1
00:00:01,839 --> 00:00:06,630
For the non-homogeneous system of equations,
which means that for your Right Hand Side,

2
00:00:06,630 --> 00:00:15,040
at least one of b1, b2, … bn is non-zero,
let’s see how to solve this:

3
00:00:15,040 --> 00:00:20,920
The general matrix representation is AX equals
B

4
00:00:20,920 --> 00:00:29,539
Pre-multiply it by A inverse: so A inverse
times A times X equals A inverse times B

5
00:00:29,539 --> 00:00:35,280
(You have to do the operation on both sides
of the equation, to keep the relation the

6
00:00:35,280 --> 00:00:40,530
same)
And provided A inverse exists, then you will

7
00:00:40,530 --> 00:00:46,540
recognize this part: A inverse times A as
the Identity matrix of Order n [times X] equals

8
00:00:46,540 --> 00:00:53,940
A inverse times B.
Any matrix multiplied by Identity is just

9
00:00:53,940 --> 00:01:03,760
itself, so that gives us the solution:
X equals A inverse times B, provided A inverse

10
00:01:03,760 --> 00:01:06,200
exists,
i.e.

11
00:01:06,200 --> 00:01:16,860
[X equals] adjoint(A) over det(A) times B
So this is the method to find the solution

12
00:01:16,860 --> 00:01:21,999
to a set of linear equations in n unknowns.

13
00:01:21,999 --> 00:01:28,060
Now there are some special cases:
This thing [X = adj(A) over det(A) times B]

14
00:01:28,060 --> 00:01:37,140
works fine if the det(A) is non-zero
What happens if the determinant of A is zero?

15
00:01:37,140 --> 00:01:47,729
Special case: if det(A) is zero, look at the
numerator of this expression [X = adj(A) over

16
00:01:47,729 --> 00:01:54,229
det(A) times B]:
If [adj(A) times B], i.e. if this product

17
00:01:54,229 --> 00:02:10,380
is not zero, the system of equations [AX = B]
is Inconsistent, and it has NO SOLUTIONS.

18
00:02:10,380 --> 00:02:22,300
But if the numerator [adj(A) times B] is also
zero (in addition to the denominator being

19
00:02:22,300 --> 00:02:35,129
zero), then the system is Consistent, and
it has an INFINITE NUMBER OF SOLUTIONS.

20
00:02:35,129 --> 00:02:50,720
Ok… so this is one way, using Matrix Operations,
to solve a system of simultaneous linear equations.

21
00:02:50,720 --> 00:03:10,730
A second way, is using Determinants, or what
is known as “Cramer’s Rule”:

22
00:03:10,730 --> 00:03:18,450
For the same system of equations [AX = B],
the solution for each unknown variable is

23
00:03:18,450 --> 00:03:31,780
given as:
xi equals 1 over det(A) times this determinant:

24
00:03:31,780 --> 00:03:38,110
so
a11, a21, … an1

25
00:03:38,110 --> 00:03:45,069
a21, a22, … an2
and then observe this carefully:

26
00:03:45,069 --> 00:03:56,049
find the ith column of the determinant: so
a1i: replace it by b1

27
00:03:56,049 --> 00:04:06,889
a2i: replace it by b2
 so this is a substitution operation:

28
00:04:06,889 --> 00:04:11,370
you don’t keep the original term a1i, a2i,
…

29
00:04:11,370 --> 00:04:18,250
And so on… keep replacing this [column]
by the elements of the Right Hand Side … bn

30
00:04:18,250 --> 00:04:31,419
And then the rest of the determinant stays
the same: all the way up to a1n, a2n, ann

31
00:04:31,419 --> 00:04:42,400
So this whole operation: we can write it in
short-hand as: [xi equals] det(Ai) over det(A),

32
00:04:42,400 --> 00:04:49,220
where the det(Ai) basically means that you
are substituting the ith column of the determinant

33
00:04:49,220 --> 00:04:52,880
det(A) by the Right Hand Side, i.e. the elements
of matrix B.

34
00:04:52,880 --> 00:05:02,180
This is known as Cramer’s Rule.

35
00:05:02,180 --> 00:05:09,090
In reality: these two (methods to solve a
system of linear equations) are identical.

36
00:05:09,090 --> 00:05:13,099
If you care to write this [X = adj(A) over
det(A) times B] whole thing down symbolically,

37
00:05:13,099 --> 00:05:16,770
you can show that this works out to be [xi
equals] det(Ai) over det(A) exactly.

38
00:05:16,770 --> 00:05:25,979
i.e. each element of X [xi] will work out
to be adj(A) over det(A) times matrix B, which

39
00:05:25,979 --> 00:05:33,659
will work out to be this [det(Ai) over det(A)]
Now again, what happens if the denominator

40
00:05:33,659 --> 00:05:35,889
is zero?

41
00:05:35,889 --> 00:05:44,419
Special case: if det(A) equals zero, well
again – look at the numerator:

42
00:05:44,419 --> 00:05:55,460
If any of the numerators det(Ai) is also zero:
Inconsistent set of equations (i.e. there

43
00:05:55,460 --> 00:05:59,120
is NO SOLUTION).

44
00:05:59,120 --> 00:06:05,750
I’m sorry – if any of the determinants
in the numerator is non-zero: it is Inconsistent

45
00:06:05,750 --> 00:06:07,720
(NO SOLUTION).

46
00:06:07,720 --> 00:06:19,580
If all det(Ai) determinants are zero for all
i: the system is Consistent, and it has an

47
00:06:19,580 --> 00:06:27,199
INFINITE NUMBER OF SOLUTIONS.

48
00:06:27,199 --> 00:06:34,159
So we’ve looked at 2 methods of how to solve
a system of simultaneous linear equations

49
00:06:34,159 --> 00:06:39,930
in n unknowns, for the “Non-homogeneous
case”, which means at least one of the elements

50
00:06:39,930 --> 00:06:44,600
of your Right Hand Side (the B matrix) is
non-zero.

51
00:06:44,600 --> 00:07:01,530
Now the only thing to look at that is remaining,
is the “Homogeneous” system: which means

52
00:07:01,530 --> 00:07:12,680
that every single one of the Right Hand Side
(b1, b2, … bn) is zero.

53
00:07:12,680 --> 00:07:17,159
Again, we can look at it using this method
[i.e.

54
00:07:17,159 --> 00:07:26,460
Cramer’s Rule]:
If the determinant det(A) is non-zero: there

55
00:07:26,460 --> 00:07:36,530
is only a TRIVIAL SOLUTION, which means every
single variable x1, x2, … all the way to

56
00:07:36,530 --> 00:07:39,370
xn is zero.

57
00:07:39,370 --> 00:07:49,380
But if the determinant det(A) is zero: then
there is an INFINITE NUMBER OF SOLUTIONS.

58
00:07:49,380 --> 00:08:02,439
So these are the 2 general methods to find
out the values of the unknown variables x1,

59
00:08:02,439 --> 00:08:04,689
x2, … all the way through xn.

60
00:08:04,689 --> 00:08:11,490
Let’s take a Solved Example to better understand
how to work these methods.

61
00:08:11,490 --> 00:08:30,140
Example: Let’s say
Solve this system of equations:

62
00:08:32,320 --> 00:08:48,700
x + 7y – 3z = 11
25y + z = –3

63
00:08:48,700 --> 00:09:01,060
And 3x – 6y + 2z = 0
Now as soon as you have a set of equations

64
00:09:01,060 --> 00:09:07,090
given to you, there are a few things to check:
So first of all, how many unknowns?

65
00:09:07,090 --> 00:09:14,340
x, y and z: 3 unknowns, and you have 3 equations
(in 3 unknowns): so the number of equations

66
00:09:14,340 --> 00:09:16,420
is equal to the number of unknowns.

67
00:09:16,420 --> 00:09:24,350
Now the Right Hand part of this set of equations:
11, –3, 0: so clearly it is NOT a Homogeneous

68
00:09:24,350 --> 00:09:30,350
system, because you have these non-zero elements
{11, –3} on the Right Hand Side.

69
00:09:30,350 --> 00:09:34,610
The next thing to check: would be this determinant

70
00:09:34,610 --> 00:09:41,170
det(A):  this part: AX equals
B: let us first write it in that form:

71
00:09:42,540 --> 00:09:52,060
So A would be 1, 7, –3
 it’s 0 times x so 0, 25, 1

72
00:09:52,060 --> 00:09:57,640
And 3, –6, 2
This is your A matrix

73
00:09:57,640 --> 00:10:03,560
Times the variable matrix: in this case x
y z

74
00:10:03,560 --> 00:10:13,100
Equals B, which is 11, – 3, 0
So after writing it in this form AX equals

75
00:10:13,120 --> 00:10:19,640
B, the next thing to check is whether 
determinant, det(A) is zero or not.

76
00:10:19,640 --> 00:10:24,100
Check this calculation: so [determinant of]
1, 7, –3

77
00:10:24,100 --> 00:10:29,340
0, 25, 1
3, –6, 2

78
00:10:29,340 --> 00:10:36,440
Works out to be:
1 times 56

79
00:10:36,440 --> 00:10:42,400
I’m expanding by this [first] column
NOTE that: if any column or row of a determinant

80
00:10:42,400 --> 00:10:47,680
has one or more zero elements, it is always
easier to expand by that row or column

81
00:10:47,690 --> 00:10:51,710
So that’s why I’m choosing to expand by
this [first] column (instead of by any other

82
00:10:51,710 --> 00:10:58,820
row or column)
1 times (50 plus 6), so 56, minus 0 times

83
00:10:58,820 --> 00:11:06,820
(something) (the cofactor of this element,
which we don’t care about), plus 3 times

84
00:11:06,820 --> 00:11:16,190
(7 minus –75), so 82
So the value of the determinant, det(A) works

85
00:11:16,190 --> 00:11:29,240
out to be 302, which is not zero.
Which means: we can find out these unknown

86
00:11:29,240 --> 00:11:35,700
values [x, y and z]
Because we’re taking this as a Worked Out

87
00:11:35,700 --> 00:11:39,360
example, I want to demonstrate this by both
methods.

88
00:11:39,360 --> 00:11:46,750
Let’s first try to find out the values of
x, y and z by the Matrix Method.

89
00:11:46,750 --> 00:11:56,070
Using the Matrix Method: well, x, y and z:
you need to find out as A inverse times B

90
00:11:56,070 --> 00:12:00,610
using this definition [X equals A inverse
times B]

91
00:12:00,610 --> 00:12:12,890
And to do that: you first need to find out
A inverse, so that is adj(A) times B over

92
00:12:12,890 --> 00:12:20,860
det(A)
For calculating the adjoint: you need to find

93
00:12:20,860 --> 00:12:29,890
out the Co-Factors of each element of A.
Let’s take an example. To recall: C11 is

94
00:12:29,890 --> 00:12:40,290
(–1) to the power of (i + j), so (1 + 1),
and then ,

95
00:12:40,290 --> 00:12:48,230
i.e. mentally block off the ith row and jth
column and calculate the determinant of the

96
00:12:48,230 --> 00:12:54,340
Minor of aij: so 50 minus –6, which equals
(–1)2(56) equals 56

97
00:12:54,340 --> 00:13:00,510
And so on… I’ll leave it as an exercise
for the reader to calculate each Cofactor

98
00:13:00,510 --> 00:13:09,000
And what you can show, is:
Adj(A) is basically the transpose of the Co-factors

99
00:13:09,000 --> 00:13:16,830
of all the elements of A, which works out
to be this:

100
00:13:16,830 --> 00:13:28,830
56, 4, 82
3, –7, –1

101
00:13:28,830 --> 00:13:42,030
– 75, 27, 25
So A inverse is simply the adjoint adj(A)

102
00:13:42,030 --> 00:13:54,400
divided by the determinant det(A), so 1 over
302 times <this whole big matrix: I’m not

103
00:13:54,400 --> 00:14:00,590
gonna write it again>
And then, once you have A inverse: you get

104
00:14:00,590 --> 00:14:09,440
your unknown variables x, y, z is [equal to]
A inverse times B

105
00:14:09,440 --> 00:14:26,571
Well… I’ll write it here:
1 over 302 times

106
00:14:26,571 --> 00:14:32,490
56, 4, 82
3, –7, –1

107
00:14:32,490 --> 00:14:37,450
– 75, 27, 25
times

108
00:14:37,450 --> 00:14:41,460
your Right Hand Side matrix, which is 11,
–3, 0

109
00:14:41,460 --> 00:14:48,250
And you can do this calculation; it works
out to be:

110
00:14:48,250 --> 00:14:55,940
Let’s still keep this {302} outside: 1 over
302 times (first do the multiplication here

111
00:14:55,940 --> 00:15:02,180
and you can show that this works out to be)

112
00:15:02,180 --> 00:15:05,660
–906

113
00:15:05,660 --> 00:15:10,170
Which finally gives you
x is 2

114
00:15:10,170 --> 00:15:16,390
y is 0
and z is –3

115
00:15:16,390 --> 00:15:20,850
So this is one way to find out the values
of x, y and z