Faculty of Engineering and Applied Science
2000 Fall
[Note: some browsers do not display symbols correctly.
Read
Þ as
Þ (implies),
« as
« (two-way arrow),
¬ as
¬ (left arrow),
Ö as
Ö
(check mark),
- as
- (minus) and
ú as
ú (set of real numbers).]
Find the value of the determinant for each of the following matrices.
[Note: if your browser shows double bars around each matrix, then
read this as single bars = determinant.]
1 | 0 | -1 |
-3 | 5 | 7 |
2 | 3 | 4 |
Method 1:
by cofactor expansion along row 1:
det A =
| 1 0 -1 | | -3 5 7 | = +1 * | 5 7 | - 0 + (-1) * | -3 5 | | 2 3 4 | | 3 4 | | 2 3 | = (20 - 21) - (-9 - 10) = -1 + 19 = 18
Method 2: by row reduction to triangular form:
| 1 0 -1 | | -3 5 7 | | 2 3 4 |
R2 ¬
R2 + 3 R1,
R3 ¬
R3 - 2 R1:
| 1 0 -1 | = | 0 5 4 | | 0 3 6 |
R2 ¬
R2 / 5:
| 1 0 -1 | = 5 * | 0 1 4/5| | 0 3 6 |
R3 ¬
R3 - 3 R2:
| 1 0 -1 | = 5 * | 0 1 4/5| = 5 * 1 * 1 * 18/5 = 18 | 0 0 18/5|
Therefore det A = 18
1 | 0 | -1 |
3 | 5 | 7 |
2 | 3 | 4 |
Method 1:
by cofactor expansion along row 1:
det A =
| 1 0 -1 | | 3 5 7 | = +1 * | 5 7 | - 0 + (-1) * | 3 5 | | 2 3 4 | | 3 4 | | 2 3 | = (20 - 21) - (9 - 10) = -1 + 1 = 0
Method 2: by row reduction to triangular form:
| 1 0 -1 | | 3 5 7 | | 2 3 4 |
R2 ¬
R2 - 3 R1,
R3 ¬
R3 - 2 R1:
| 1 0 -1 | | 0 5 10 | | 0 3 6 |At this point we notice that R2 = (5/3) × R3
1 | 2 | -1 | 4 |
3 | 5 | 2 | 3 |
-1 | 2 | 1 | 4 |
5 | -1 | 2 | 3 |
Cofactor expansion along any row or column will involve the
evaluation of four 3×3 determinants, each of which will
require the evaluation of three 2×2 determinants.
Therefore we shall attempt a reduction to triangular form:
det A =
| 1 2 -1 4 | | 3 5 2 3 | | -1 2 1 4 | | 5 -1 2 3 |
R2 ¬
R2 - 3 R1,
R3 ¬
R3 + R1,
R4 ¬
R4 - 5 R1
(and extract the common factor found in row 3):
| 1 2 -1 4 | | 1 2 -1 4 | = | 0 -1 5 -9 | = 4 * | 0 -1 5 -9 | | 0 4 0 8 | | 0 1 0 2 | | 0 -11 7 -17 | | 0 -11 7 -17 |
R2 « R3:
| 1 2 -1 4 | = -4 * | 0 1 0 2 | | 0 -1 5 -9 | | 0 -11 7 -17 |
R3 ¬
R3 + R2,
R4 ¬
R4 + 11 R2:
| 1 2 -1 4 | | 1 2 -1 4 | = -4 * | 0 1 0 2 | = -20 * | 0 1 0 2 | | 0 0 5 -7 | | 0 0 1 -7/5| | 0 0 7 5 | | 0 0 7 5 |
R4 ¬
R4 - 7 R3:
| 1 2 -1 4 | = -20 * | 0 1 0 2 | | 0 0 1 -7/5| | 0 0 0 74/5| = -20 * 1 * 1 * 1 * 74/5 = -296
Therefore det A = -296
A box has co-terminal sides represented by the vectors
v1 = i + 2 j
- 3 k,
Find the volume of the box by evaluating the determinant of the
matrix (V1V2V3),
where Vi is the column matrix representation of the vector
vi.
Volume of box = abs(det(A)), where det(A)
= det(V1V2V3) =
| 1 1 3 | | 2 -4 2 | | -3 2 5 |
Method 1:
by cofactor expansion along row 1:
det A =
1 * | -4 2 | - 1 * | 2 2 | + 3 * | 2 -4 | | 2 5 | | -3 5 | | -3 2 | = (-20 - 4) - (10 + 6) + 3(4 - 12) = -24 - 16 - 24 = -64
Method 2: by row reduction to triangular form:
| 1 1 3 | | 2 -4 2 | | -3 2 5 |
R2 ¬
R2 - 2 R1,
R3 ¬
R3 + 3 R1:
| 1 1 3 | | 1 1 3 | = | 0 -6 -4 | = -6 * | 0 1 2/3| | 0 5 14 | | 0 5 14 |R3 ¬ R3 - 5 R1:
| 1 1 3 | = -6 * | 0 1 2/3| | 0 0 32/3| = -6 * 1 * 1 * 32/3 = -64
Therefore volume of box = | -64 | = 64 (in the appropriate units)
Use matrix determinants to find the polynomial that passes through
a given set of points. To find the polynomial of order
"n" that passes through "n+1" given points we must
evaluate the determinant of an (n+1)×(n+1) matrix.
For example, for the set of points given by
S = { (x, y) |
(1, -1), (3, 5) } ,
we evaluate
x0 | x1 | y |
1 | 1 | -1 |
1 | 3 | 5 |
The required determinant is
x0 | x1 | x2 | y |
1 | -1 | (-1)2 | 5 |
1 | 0 | 02 | 2 |
1 | 2 | 22 | -8 |
The presence of the zeroes in row 3 suggests a cofactor expansion.
In order to make the collection of coefficients easier, expand
initially along row 1:
| x^0 x^1 x^2 y | | -1 1 5 | | 1 1 5 | | 1 -1 1 5 | = | 0 0 2 | - | 1 0 2 | x | 1 0 0 2 | | 2 4 -8 | | 1 4 -8 | | 1 2 4 -8 | | 1 -1 5 | 2 | 1 -1 1 | + | 1 0 2 | x - | 1 0 0 | y = 0 | 1 2 -8 | | 1 2 4 |
The coefficient of x0, by cofactor expansion
along row 2, is
| -1 1 5 | + | 0 0 2 | = - 0 + 0 - 2 | -1 1 | | 2 4 -8 | | 2 4 | = -2 * (-4 - 2) = +12
The coefficient of x1, by cofactor expansion
along row 2, is
| 1 1 5 | - | 1 0 2 | = -( -1 | 1 5 | + 0 - 2 | 1 1 | ) | 1 4 -8 | ( | 4 -8 | | 1 4 | ) = +1 * (-8 - 20) + 2 * (4 - 1) = -28 + 6 = -22
The coefficient of x2, by cofactor expansion
along row 2, is
| 1 -1 5 | + | 1 0 2 | = -1 | -1 5 | + 0 - 2 | 1 -1 | | 1 2 -8 | | 2 -8 | | 1 2 | = -1 * (8 - 10) - 2 * (2 + 1) = 2 - 6 = -4
The coefficient of y, by cofactor expansion
along row 2, is
| 1 -1 1 | - | 1 0 0 | = - ( -1 | -1 1 | + 0 - 0 ) | 1 2 4 | ( | 2 4 | ) = +1 * (-4 - 2) = -6
The required polynomial is therefore
12 - 22 x
- 4 x2
- 6 y = 0
Þ
6 - 11 x
- 2 x2
- 3 y = 0
Þ
y = (-2 x2 - 11 x + 6) / 3 |
As a check, substitute each point in turn into this
equation to show that this parabola does pass through all three
points:
6 - 11 x
- 2 x2
- 3 y = 0 :
6 - 11×(-1)
- 2×(-1)2
- 3×(5)
= 6 + 11 - 2 - 15 = 0.
Ö
6 - 11×(0)
- 2×(0)2
- 3×(2)
= 6 + 0 + 0 - 6 = 0.
Ö
6 - 11×(2)
- 2×(2)2
- 3×(-8)
= 6 - 22 - 8 + 24 = 0.
Ö
The required determinant is
x0 | x1 | x2 | x3 | y |
1 | -2 | (-2)2 | (-2)3 | 8 |
1 | -1 | (-1)2 | (-1)3 | 3 |
1 | 1 | 12 | 13 | -5 |
1 | 2 | 22 | 23 | 9 |
There are no zero entries in this 5×5 determinant.
Therefore carry out a partial row reduction to introduce some
zero entries:
R3 ¬
R3 - R2,
R4 ¬
R4 - R2,
R5 ¬
R5 - R2:
x0 | x1 | x2 | x3 | y |
1 | -2 | 4 | -8 | 8 |
0 | 1 | -3 | 7 | -5 |
0 | 3 | -3 | 9 | -13 |
0 | 4 | 0 | 16 | 1 |
R2 ¬
R2 + 2 R3,
R4 ¬
R4 - 3 R3,
R5 ¬
R5 - 4 R3:
x0 | x1 | x2 | x3 | y |
1 | 0 | -2 | 6 | -2 |
0 | 1 | -3 | 7 | -5 |
0 | 0 | 6 | -12 | 2 |
0 | 0 | 12 | -12 | 21 |
= 2 × 3 × |
|
We could continue with the row reduction, but the cofactor
expansion is now easier than it would have been earlier.
Row reduction much beyond this point will result in the introduction
of non-integer entries.
x0 | x1 | x2 | x3 | y |
1 | 0 | 0 | 0 | -25/6 |
0 | 1 | 0 | 0 | -65/12 |
0 | 0 | 1 | 0 | 19/6 |
0 | 0 | 0 | 1 | 17/12 |
In order to make the collection of coefficients easier, expand
initially along row 1:
| x^0 x^1 x^2 x^3 y | | 1 0 -2 6 -2 | | 0 1 -3 7 -5 | = 0 = | 0 0 3 -6 1 | | 0 0 4 -4 7 | | 0 -2 6 -2 | | 1 -2 6 -2 | 1 | 1 -3 7 -5 | - | 0 -3 7 -5 | x | 0 3 -6 1 | | 0 3 -6 1 | | 0 4 -4 7 | | 0 4 -4 7 | | 1 0 6 -2 | 2 | 1 0 -2 -2 | 3 + | 0 1 7 -5 | x - | 0 1 -3 -5 | x | 0 0 -6 1 | | 0 0 3 1 | | 0 0 -4 7 | | 0 0 4 7 | | 1 0 -2 6 | - | 0 1 -3 7 | y = 0 | 0 0 3 -6 | | 0 0 4 -4 |
The coefficient of x0, by cofactor expansion
down column 1, is
| 0 -2 6 -2 | | -2 6 -2 | + | 1 -3 7 -5 | = 0 - 1 | 3 -6 1 | + 0 - 0 | 0 3 -6 1 | | 4 -4 7 | | 0 4 -4 7 | = -( -2 | -6 1 | - 3 | 6 -2 | + 4 | 6 -2 | ) ( | -4 7 | | -4 7 | | -6 1 | ) = -( -2*(-42 + 4) - 3*(42 - 8) + 4*(6 - 12) ) = -( 76 - 102 - 24) = +50
The coefficient of x1, by cofactor expansion
down column 1, is
| 1 -2 6 -2 | | -3 7 -5 | - | 0 -3 7 -5 | = 1 | 3 -6 1 | - 0 + 0 - 0 | 0 3 -6 1 | | 4 -4 7 | | 0 4 -4 7 | = -( -3 | -6 1 | - 3 | 7 -5 | + 4 | 7 -5 | ) ( | -4 7 | | -4 7 | | -6 1 | ) = -( -3*(-42 + 4) - 3*(49 - 20) + 4*(7 - 30) ) = -( 114 - 87 - 92 ) = +65
The coefficient of x2, by cofactor expansion
down column 1 (then column 1 of the 3×3 determinant), is
| 1 0 6 -2 | | 1 7 -5 | + | 0 1 7 -5 | = 1 | 0 -6 1 | = 1 | -6 1 | | 0 0 -6 1 | | 0 -4 7 | | -4 7 | | 0 0 -4 7 | = 1(-42 + 4) = -38
The coefficient of x3, by cofactor expansion
down column 1 (then column 1 of the 3×3 determinant), is
| 1 0 -2 -2 | | 1 -3 -5 | - | 0 1 -3 -5 | = -1 | 0 3 1 | = -1 | 3 1 | | 0 0 3 1 | | 0 4 7 | | 4 7 | | 0 0 4 7 | = -1(21 - 4) = -17
The coefficient of y, by cofactor expansion
down column 1 (then column 1 of the 3×3 determinant), is
| 1 0 -2 6 | | 1 -3 7 | + | 0 1 -3 7 | = 1 | 0 3 -6 | = 1 | 3 -6 | | 0 0 3 -6 | | 0 4 -4 | | 4 -4 | | 0 0 4 -4 | = 1(-12 + 24) = +12
The required polynomial is therefore
50 + 65 x
- 38 x2
- 17 x3
+ 12 y = 0
Þ
y = (17 x3 + 38 x2 - 65 x - 50) / 12 |
As a check, substitute each point in turn into this
equation to show that this curve does pass through all four
points:
50 + 65 x
- 38 x2
- 17 x3
+ 12 y = 0:
50 + 65(-2)
- 38(-2)2
- 17(-2)3
+ 12(8)
= 50 - 130 - 152
+ 136 + 96 = 0.
Ö
50 + 65(-1)
- 38(-1)2
- 17(-1)3
+ 12(3)
= 50 - 65 - 38
+17 +36 = 0.
Ö
50 + 65(1)
- 38(1)2
- 17(1)3
+ 12(-5)
= 50 + 65 - 38 - 17
- 60 = 0.
Ö
50 + 65(2)
- 38(2)2
- 17(2)3
+ 12(9)
= 50 + 130 - 152 - 136
+ 108 = 0.
Ö
One of the problems associated with online commerce and
communication is related to the fact that some unauthorized user may
be able to access online information.
Because of this, encryption has become very important.
Below we consider a very simplified method of encryption.
First, each letter of the alphabet is numbered according to its place
in the alphabet, and a space between words is assigned the value zero.
Second, introduce an invertible encryption matrix, E.
Because this is a simplified approach, choose
[ 2 1 ] E = [ ] . [ 3 2 ]
"this is just a test message"
20,8,9,19,0,9,19,0,10,21,19,20,0,1,0,20,5,19,20,0,13,5,19,19,1,7,5,0
The column vectors to be multiplied by the encryption matrix E are
[ 20 ] [ 9 ] [ 0 ] [ 8 ] , [ 19 ] , [ 9 ] , etc.
To save time, augment all fourteen 2×1 matrices into a single 2×14 matrix to be pre-multiplied by E.
[ 2 1 ] [ 20 9 0 19 10 19 0 0 5 20 13 19 1 5 ] [ 3 2 ] [ 8 19 9 0 21 20 1 20 19 0 5 19 7 0 ] [ 48 37 9 38 41 58 1 20 29 40 31 57 9 10 ] = [ 76 65 18 57 72 97 2 40 53 60 49 95 17 15 ]
The encrypted set of numbers is therefore
48, 76, 37, 65, 9, 18, 38, 57, 41, 72, 58, 97, 1, 2, 20, 40, 29, 53, 40, 60, 31, 49, 57, 95, 9, 17, 10, 15 |
See also the associated Excel spreadsheet file.
65,105,42,63,51,79,41,64,19,38,45,69,11,19,57,95,33,60,24,36
det E = 4 - 3 = 1
Þ
E-1 = adj(E) / 1.
-1 [ 2 -1 ] ==> E = [-3 2 ]
The column vectors to be multiplied by the decryption matrix E-1 are
[ 65 ] [ 42 ] [ 51 ] [ 105 ] , [ 63 ] , [ 79 ] , etc.
As before, to save time, augment all ten 2×1 matrices into a single 2×10 matrix to be pre-multiplied by E-1.
[ 2 -1 ] [ 65 42 51 41 19 45 11 57 33 24 ] [-3 2 ] [ 105 63 79 64 38 69 19 95 60 36 ] [ 25 21 23 18 0 21 3 19 6 12 ] = [ 15 0 5 5 19 3 5 19 21 0 ]
The decrypted set of numbers is therefore
25, 15, 21, 0, 23, 5, 18, 5, 0, 19, 21, 3, 3, 5, 19, 19, 6, 21, 12,
0
The corresponding text (ignoring the trailing space) is
"you were successful"
|
See also the associated Excel spreadsheet file.
In the circuit illustrated below, determine the values of all of the currents:
Using Kirchoffs laws:
No net voltage loss around the upper loop:
2 - 4 I1
- 3 I2 = 0
No net voltage loss around the lower loop:
- 4 + 3 I2
+ 4 I3 = 0
Charge conservation (flow in = flow out at each node):
I1 + I3 = I2
The linear system is
Program to handle the Arithmetic in the Row Reduction of a Linear System VisualBASIC version (c)1999, Glyn George. Linear System: Row 1: 1/1 -1/1 1/1 0/1 Row 2: 4/1 3/1 0/1 2/1 Row 3: 0/1 3/1 4/1 4/1 ----------------------------------------------------------------------------- Selected row operation: Subtract 4 / 1 times row 1 from row 2 . Linear System: Row 1: 1/1 -1/1 1/1 0/1 Row 2: 0/1 7/1 -4/1 2/1 Row 3: 0/1 3/1 4/1 4/1 ----------------------------------------------------------------------------- Selected row operation: Divide row 2 by 7 / 1 . Linear System: Row 1: 1/1 -1/1 1/1 0/1 Row 2: 0/1 1/1 -4/7 2/7 Row 3: 0/1 3/1 4/1 4/1 ----------------------------------------------------------------------------- Selected row operation: Subtract 3 / 1 times row 2 from row 3 . Linear System: Row 1: 1/1 -1/1 1/1 0/1 Row 2: 0/1 1/1 -4/7 2/7 Row 3: 0/1 0/1 40/7 22/7 ----------------------------------------------------------------------------- Selected row operation: Divide row 3 by 40 / 7 . Linear System: Row 1: 1/1 -1/1 1/1 0/1 Row 2: 0/1 1/1 -4/7 2/7 Row 3: 0/1 0/1 1/1 11/20 ----------------------------------------------------------------------------- Selected row operation: Subtract -1 / 1 times row 2 from row 1 . Linear System: Row 1: 1/1 0/1 3/7 2/7 Row 2: 0/1 1/1 -4/7 2/7 Row 3: 0/1 0/1 1/1 11/20 ----------------------------------------------------------------------------- Selected row operation: Subtract 3 / 7 times row 3 from row 1 . Linear System: Row 1: 1/1 0/1 0/1 1/20 Row 2: 0/1 1/1 -4/7 2/7 Row 3: 0/1 0/1 1/1 11/20 ----------------------------------------------------------------------------- Selected row operation: Subtract -4 / 7 times row 3 from row 2 . Linear System: Row 1: 1/1 0/1 0/1 1/20 Row 2: 0/1 1/1 0/1 3/5 Row 3: 0/1 0/1 1/1 11/20 ----------------------------------------------------------------------------- Program execution terminated.
Thus the currents are (I1, I2, I3) = (1, 12, 11) / 20 = (0.05, 0.60, 0.55) ampère.
Another application for matrices is to determine numerical approximations. In this problem we are looking for the numerical approximation for the steady-state temperature distribution in a flat plate when the temperature is known at every point on the boundary of the plate. We will be considering only the simplest geometry, a rectangular plate. A visual representation of such a plate is given below.
Determine the temperature at each of the points (nodes) a, b, c, d, e, f, g, h, k by solving the following system of linear equations.
4g = 0 + d + h + 18.75 | 4h = g + e + k + 25 | 4k = h + f + 0 + 18.75 |
4d = 0 + a + e + g | 4e = d + b + f + h | 4f = e + c + 0 + k |
4a = 0 + 20 + b + d | 4b = a + 10 + c + e | 4c = b + 20 + 0 + f |
Normally to find the value of the temperature at these nine points we would have to solve a system of nine equations in nine unknowns. However because of the symmetry of the boundary temperatures around the vertical mid-line in this particular problem we have the additional set of equations
c = a | f = d | k = g |
This last set of equations when properly used will reduce the set of equations to be solved to a set of six equations in six unknowns.
Replace c, f and k where they occur.
The linear system then reduces to
-d + 4g - h | = 18.75 | (1) |
-e - 2g + 4h | = 25 | (2) |
-d + 4g - h | = 18.75 | (3) |
-a + 4d - e - g | = 0 | (4) |
- b - 2d + 4e - h | = 0 | (5) |
-a + 4d - e - g | = 0 | (6) |
4a - b - d | = 20 | (7) |
-2a + 4b - e | = 10 | (8) |
4a - b - d | = 20 | (9) |
However, equations (3), (6) and (9) are clearly redundant, as they are identical to equations (1), (4) and (7) respectively. Upon eliminating the redundant equations, we are left with a linear system of six equations in six unknowns.
The lengthy calculations of the linsys.exe
program
are in a separate file.
The solution vector is
(a, b, c, d, e, f, g, h, k) = (4065, 4178, 4065, 3122, 4102, 3122, 4321, 5986, 4321) / 448 |