Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
EG1C2 Engineering Maths : Matrix Algebra
Dr Richard Mitchell, Department of Cybernetics
Aim Describe matrices and their use in varied applications
Syllabus
Introduction : why use; definitions & simple processing
Determinants and inverses
Two Port Networks, for electronics & other systems
Gaussian elimination to solve linear equations + Gauss-Jordan
Matrix Rank and Cramer's Rule and Theorem
Eigenvalues and eigenvectors, applications incl. state space
Vectors - and their relationship with matrices.
References
K.A.Stroud – Engineering Mathematics – Fifth Edn - Palgrave
Glyn James - Modern Engineering Mathematics - Addison Wesley
Online Notes http://www.cyber.rdg.ac.uk/people/R.Mitchell/teach.htm
p1 RJM 06/08/02
EG1C2 Engineering Maths: Matrix Algebra 1
Matrix Algebra - Introduction
Simple systems - defined by equations y = f(x): e.g. y = kx
Many systems involve many variables:
y1 = k11x1 + k12x2 + k13x3
y2 = k21x1 + k21x2 + k23x3
y3 = k31x1 + k32x2 + k33x3 etc.
Matrix techniques allow us to represent these by y = k x
Bold letters show these are vector or matrix quantities.
Why we use matrices
Can group related data and process them together.
Can use clever techniques to solve problems.
Standard matrix manipulation techniques are available.
Can use a computer to process the data: e.g. use MATLAB.
In course use only 2 or 3 variables, use computers for more.
p2 RJM 06/08/02
EG1C2 Engineering Maths: Matrix Algebra 1
Example: Suspended Mass
16.26
T1 & T2 are tensions
in two wires.
T2
T1
o
36.87
300N
o
(Angles chosen for
easy arithmetic)
Resolving forces in horizontal and vertical directions:
cos (16.26) T1 = cos (36.87) T2
sin (16.26) T1 + sin (36.87) T2 = 300 {weight of mass}
Simplifies to 0.96 T1 - 0.8 T2 = 0 and 0.28 T1 + 0.6 T2 = 300
T1
0.96 0.8
0
In Matrix Form: T , A
and Y
0.28 0.6
300
T2
The system can then be written as A.T = Y
T, Y are vectors - 1 column 2 rows, A is a matrix - 2 columns 2 rows
p3 RJM 06/08/02
EG1C2 Engineering Maths: Matrix Algebra 1
Example : Electronic Circuit
i1
18
12V
i3
i2
10
15
Using Kirchhoff’s Voltage and Current Laws
First Loop
12 = 18 i1 + 10 i2 or 18 i1 + 10 i2 = 12
Second Loop
10 i2 = 15 i3
or -10 i2 + 15 i3 = 0
Summing currents i1 = i2 + i3
or -i1 + i2 + i3 = 0
i1
12
18 10 0
Let i i 2 v = 0 A = 0 10 15 then A.i = v
1
i 3
0
1 1
p4 RJM 06/08/02
EG1C2 Engineering Maths: Matrix Algebra 1
Matrix Definitions
Rectangular array of numbers, complex numbers, functions, ..
If r rows & c columns, r*c elements, r*c is order of matrix.
a11 a12 ... a1n
a
a
...
a
22
2n
A = a ij 21
:
:
a
a
...
a
m1 m2
mn
A is n * m matrix
Square if n = m
aij is in row i column j
21 52 13
42 10 1 is a 2 * 3 matrix, order 6
A vector has one
column or one row
R a11 a12 a13 .... a1n
Square matrix: a11, a22, .. ann form the main diagonal
p5 RJM 06/08/02
EG1C2 Engineering Maths: Matrix Algebra 1
a11
a
C 21
..
a
m1
Simple Matrix Operations
Illustrate these by defining A (size m*n) and B (size r*c)
a11 a12
a
a 22
21
A=
:
a
m1 a m2
a1n
a 2n
:
... a mn
...
...
b11 b12 ... b1c
b
b
...
b
22
2c
B 21
:
:
b
b
...
b
r1
r2
rc
Equality : A and B are identical if,
they are of the same size, m = r and n = c, and
corresponding elements are same ie aij = bij for all i,j
A 1 2 B 1 2 C 1 1 D 1 2 2 A = B, but
3 4
3 4
3 4
3 4 4 A C, A D
p6 RJM 06/08/02
EG1C2 Engineering Maths: Matrix Algebra 1
Matrix Addition
A and B must have same size: result is a matrix also of the same
size, call it matrix R, in which for all elements, rij = aij + bij.
a12 b12
a11 b11
a b
a 22 b 22
21
21
R = A+B =
:
a
m1 b m1 a m2 b m2
a1n b1n
a 2n b 2n
:
... a mn b mn
...
...
1 3 8 1 1 8 3 1 9 4
e.g.
2 7 4 2 2 4 7 2 6 9
4 1 1 3
Exercise
5 2 2 4
NB A + B = B + A (A + B) + C = A + (B + C) = A + B + C
p7 RJM 06/08/02
EG1C2 Engineering Maths: Matrix Algebra 1
Matrix Subtraction
A and B must have same size: result is a matrix also of the
same size, call it R, in which for all elements, rij = aij - bij.
1 3 8 1 1 8 3 1 7 2
e.g.
2 7 4 2 2 4 7 2 2 5
Matrix Scalar Multiplication
Each element in the matrix is multiplied by a scalar constant:
R = k.A
Thus, each rij=k.aij.
2 1 3 5 * 2 5 *1 5 * 3 10 5 15
e.g. 5 *
5
2
6
5
*
5
5
*
2
5
*
6
25
10
30
Note, k * (A + B) = k*A + k*B
p8 RJM 06/08/02
EG1C2 Engineering Maths: Matrix Algebra 1
Matrix Multiplication
R = A*B, number of columns in A = number of rows in B;
R has number of rows as A and number of columns as B.
e.g; if A is 2 * 3, B is 3 * 4 , then A * B is 2 * 4 matrix.
n
In resultant matrix : rij a ik * b kj
k =1
Do first element of ith row of A * first element of jth column of B
Multiply second, third, etc. elements of these rows and columns
Find the sum of each product and store in rij
If A * B ok, then B * A is only possible if A & B are square.
A * B B * A in general. A*(B*C) = (A*B)*C = A*B*C
A*(B+C) = (A*B)+(A*C) (k*A)*B=k*(A*B)=A*(k*B) scalar k
p9 RJM 06/08/02
EG1C2 Engineering Maths: Matrix Algebra 1
Examples & Exercise
2 5 6 2 * 6 5 *1 17
4 3 1 4 * 6 3 *1 27
2 1 0
2 1 3
*
0
3
1
1 4 1
1 2 1
2 * 2 1* 0 3 *1 2 *1 1* 3 3 * 2 2 * 0 1*1 3 *1
1* 2 4 * 0 1*1 1*1 4 * 3 1* 2 1* 0 4 *1 1*1
7 11 4
3
15
5
2 5 1 2
4 3 3 4
p10 RJM 06/08/02
*
*
*
*
*
*
EG1C2 Engineering Maths: Matrix Algebra 1
*
*
Multiplication and Example Systems
Suspended Mass: A 2*2 matrix times a 2*1 vector = a 2*1 vector
0.96 0.8 T1 0.96 T1 + - 0.8 T2 0
0.28 0.6 * T 0.28 T + 0.6 T 300
2
1
2
Electronic Circuit: A 3*3 matrix times a 3*1 vector = a 3*1 vector
18 10 0 i1 18 * i1 10 * i 2 12
0 10 15 * i - 10 * i 15 * i 0
2
3
2
1 i3 i1 i 2 i3 0
1 1
Exercise
Express equations 5x + 2y = 16 and 3x = 18 – 4y in matrix form
p11 RJM 06/08/02
x
y
EG1C2 Engineering Maths: Matrix Algebra 1
Matrix Transpose (A transposed is AT)
If R = AT, then rij = aji. If A is size m*n, then AT is size n*m.
a11 a12 ... a1n
a11 a 21 ... a m1
a
a
a
...
a
a
...
a
22
2n then A T 12
22
m2
A 21
:
:
:
a
a
a
...
a
a
...
a
m1
1n
m2
mn
2n
mn
1 4
T
1
1
2
3
1 2
1 3
2 5
2 1 2
4 5 6
3 4
2 4
3 6
Note: (AT)T=A (A+B)T=AT+BT (A*B)T=BT*AT
(kA)T=kAT
If AT=A, A is symmetrix matrix. If AT=-A, A is skew-symmetrix matrix
T
T
1 4
4 3 is symmetric
p12 RJM 06/08/02
0 2
2 0 is skew - symmetric
EG1C2 Engineering Maths: Matrix Algebra 1