For the non-homogeneous system of equations, which means that for your Right Hand Side,
at least one of b1, b2, … bn is non-zero, let’s see how to solve this:
The general matrix representation is AX equals B
Pre-multiply it by A inverse: so A inverse times A times X equals A inverse times B
(You have to do the operation on both sides of the equation, to keep the relation the
same) And provided A inverse exists, then you will
recognize this part: A inverse times A as the Identity matrix of Order n [times X] equals
A inverse times B. Any matrix multiplied by Identity is just
itself, so that gives us the solution: X equals A inverse times B, provided A inverse
exists, i.e.
[X equals] adjoint(A) over det(A) times B So this is the method to find the solution
to a set of linear equations in n unknowns.
Now there are some special cases: This thing [X = adj(A) over det(A) times B]
works fine if the det(A) is non-zero What happens if the determinant of A is zero?
Special case: if det(A) is zero, look at the numerator of this expression [X = adj(A) over
det(A) times B]: If [adj(A) times B], i.e. if this product
is not zero, the system of equations [AX = B] is Inconsistent, and it has NO SOLUTIONS.
But if the numerator [adj(A) times B] is also zero (in addition to the denominator being
zero), then the system is Consistent, and it has an INFINITE NUMBER OF SOLUTIONS.
Ok… so this is one way, using Matrix Operations, to solve a system of simultaneous linear equations.
A second way, is using Determinants, or what is known as “Cramer’s Rule”:
For the same system of equations [AX = B], the solution for each unknown variable is
given as: xi equals 1 over det(A) times this determinant:
so a11, a21, … an1
a21, a22, … an2 and then observe this carefully:
find the ith column of the determinant: so a1i: replace it by b1
a2i: replace it by b2 so this is a substitution operation:
you don’t keep the original term a1i, a2i, …
And so on… keep replacing this [column] by the elements of the Right Hand Side … bn
And then the rest of the determinant stays the same: all the way up to a1n, a2n, ann
So this whole operation: we can write it in short-hand as: [xi equals] det(Ai) over det(A),
where the det(Ai) basically means that you are substituting the ith column of the determinant
det(A) by the Right Hand Side, i.e. the elements of matrix B.
This is known as Cramer’s Rule.
In reality: these two (methods to solve a system of linear equations) are identical.
If you care to write this [X = adj(A) over det(A) times B] whole thing down symbolically,
you can show that this works out to be [xi equals] det(Ai) over det(A) exactly.
i.e. each element of X [xi] will work out to be adj(A) over det(A) times matrix B, which
will work out to be this [det(Ai) over det(A)] Now again, what happens if the denominator
is zero?
Special case: if det(A) equals zero, well again – look at the numerator:
If any of the numerators det(Ai) is also zero: Inconsistent set of equations (i.e. there
is NO SOLUTION).
I’m sorry – if any of the determinants in the numerator is non-zero: it is Inconsistent
(NO SOLUTION).
If all det(Ai) determinants are zero for all i: the system is Consistent, and it has an
INFINITE NUMBER OF SOLUTIONS.
So we’ve looked at 2 methods of how to solve a system of simultaneous linear equations
in n unknowns, for the “Non-homogeneous case”, which means at least one of the elements
of your Right Hand Side (the B matrix) is non-zero.
Now the only thing to look at that is remaining, is the “Homogeneous” system: which means
that every single one of the Right Hand Side (b1, b2, … bn) is zero.
Again, we can look at it using this method [i.e.
Cramer’s Rule]: If the determinant det(A) is non-zero: there
is only a TRIVIAL SOLUTION, which means every single variable x1, x2, … all the way to
xn is zero.
But if the determinant det(A) is zero: then there is an INFINITE NUMBER OF SOLUTIONS.
So these are the 2 general methods to find out the values of the unknown variables x1,
x2, … all the way through xn.
Let’s take a Solved Example to better understand how to work these methods.
Example: Let’s say Solve this system of equations:
x + 7y – 3z = 11 25y + z = –3
And 3x – 6y + 2z = 0 Now as soon as you have a set of equations
given to you, there are a few things to check: So first of all, how many unknowns?
x, y and z: 3 unknowns, and you have 3 equations (in 3 unknowns): so the number of equations
is equal to the number of unknowns.
Now the Right Hand part of this set of equations: 11, –3, 0: so clearly it is NOT a Homogeneous
system, because you have these non-zero elements {11, –3} on the Right Hand Side.
The next thing to check: would be this determinant
det(A): this part: AX equals B: let us first write it in that form:
So A would be 1, 7, –3 it’s 0 times x so 0, 25, 1
And 3, –6, 2 This is your A matrix
Times the variable matrix: in this case x y z
Equals B, which is 11, – 3, 0 So after writing it in this form AX equals
B, the next thing to check is whether determinant, det(A) is zero or not.
Check this calculation: so [determinant of] 1, 7, –3
0, 25, 1 3, –6, 2
Works out to be: 1 times 56
I’m expanding by this [first] column NOTE that: if any column or row of a determinant
has one or more zero elements, it is always easier to expand by that row or column
So that’s why I’m choosing to expand by this [first] column (instead of by any other
row or column) 1 times (50 plus 6), so 56, minus 0 times
(something) (the cofactor of this element, which we don’t care about), plus 3 times
(7 minus –75), so 82 So the value of the determinant, det(A) works
out to be 302, which is not zero. Which means: we can find out these unknown
values [x, y and z] Because we’re taking this as a Worked Out
example, I want to demonstrate this by both methods.
Let’s first try to find out the values of x, y and z by the Matrix Method.
Using the Matrix Method: well, x, y and z: you need to find out as A inverse times B
using this definition [X equals A inverse times B]
And to do that: you first need to find out A inverse, so that is adj(A) times B over
det(A) For calculating the adjoint: you need to find
out the Co-Factors of each element of A. Let’s take an example. To recall: C11 is
(–1) to the power of (i + j), so (1 + 1), and then ,
i.e. mentally block off the ith row and jth column and calculate the determinant of the
Minor of aij: so 50 minus –6, which equals (–1)2(56) equals 56
And so on… I’ll leave it as an exercise for the reader to calculate each Cofactor
And what you can show, is: Adj(A) is basically the transpose of the Co-factors
of all the elements of A, which works out to be this:
56, 4, 82 3, –7, –1
– 75, 27, 25 So A inverse is simply the adjoint adj(A)
divided by the determinant det(A), so 1 over 302 times <this whole big matrix: I’m not
gonna write it again> And then, once you have A inverse: you get
your unknown variables x, y, z is [equal to] A inverse times B
Well… I’ll write it here: 1 over 302 times
56, 4, 82 3, –7, –1
– 75, 27, 25 times
your Right Hand Side matrix, which is 11, –3, 0
And you can do this calculation; it works out to be:
Let’s still keep this {302} outside: 1 over 302 times (first do the multiplication here
and you can show that this works out to be)
–906
Which finally gives you x is 2
y is 0 and z is –3
So this is one way to find out the values of x, y and z