Matrix algebra.PDF

(821 KB) Pobierz
Chapter – 01 Matrix Algebra and Solution of Matrix Equations
1
Matrix Algebra
and Solution
of Matrix Equations
1.1 INTRODUCTION
notation and
their manipulations and applications. Vector is a one-dimensional array of numbers
and/or characters arranged as a single column. The number of rows is called the
matrix
and
vector
of that vector. Matrix is an extension of vector when a set of numbers and/or
characters are arranged in rectangular form. If it has M rows and N column, this
matrix then is said to be of order M by N. When M = N, then we say this
square
matrix is of order N (or M). It is obvious that vector is a special case of matrix when
there is only one column. Consequently, a vector is referred to as a column matrix
as opposed to the row matrix which has only one row. Braces are conventionally
used to indicate a vector such as {V} and brackets are for a matrix such as [M].
In writing a computer program, DIMENSION or DIM statements are necessary
to declare that a certain variable is a vector or a matrix. Such statements instruct
the computer to assign multiple memory spaces for keeping the values of that vector
or matrix. When we deal with a large number of different entities in a group, it is
better to arrange these entities in vector or matrix form and refer to a particular
entity by specifying where it is located in that group by pointing to the row (and
column) number(s). Such as in the case of having 100 numbers represented by the
variable names A, B, …, or by A(1) through A(100), the former requires 100 different
characters or combinations of characters and the latter certainly has the advantage
of having only one name. The A(1) through A(100) arrangement is to adopt a vector;
these numbers can also be arranged in a matrix of 10 rows and 10 columns, or 20
rows and five columns depending on the characteristics of these numbers. In the
cases of collecting the engineering data from tests of 20 samples during five different
days, then arranging these 100 data into a matrix of 20 rows and five columns will
be better than of 10 rows and 10 columns because each column contains the data
collected during a particular day.
In the ensuing sections, we shall introduce more definitions related to vector
and matrix such as transpose, inverse, and determinant, and discuss their manipula-
tions such as addition, subtraction, and multiplication, leading to the organizing of
systems of linear algebraic equations into matrix equations and to the methods of
finding their solutions, specifically the Gaussian Elimination method. An apparent
application of the matrix equation is the transformation of the coordinate axes by a
© 2001 by CRC Press LLC
Computers are best suited for repetitive calculations and for organizing data into
specialized forms. In this chapter, we review the
order
139177448.002.png
rotation about any one of the three axes. It leads to the derivation of the three basic
transformation matrices and will be elaborated in detail.
Since the interactive operations of modern personal computers are emphasized
in this textbook, how a simple three-dimensional brick can be displayed will be
discussed. As an extended application of the display monitor, the transformation of
coordinate axes will be applied to demonstrate how animation can be designed to
simulate the continuous rotation of the three-dimensional brick. In fact, any three-
dimensional object could be selected and its motion animated on a display screen.
Programming languages,
FORTRAN
,
QuickBASIC
,
MATLAB
, and
Mathe-
are to be initiated in this chapter and continuously expanded into higher
levels of sophistication in the later chapters to guide the readers into building a
collection of their own programs while learning the computational methods for
solving engineering problems.
1.2 MANIPULATION OF MATRICES
Two matrices [A] and [B] can be added or subtracted if they are of same order, say
M by N which means both having M rows and N columns. If the sum and difference
matrices are denoted as [S] and [D], respectively, and they are related to [A] and
[B] by the formulas [S] = [A] + [B] and [D] = [A]-[B], and if we denote the elements
in [A], [B], [D], and [S] as a
ij
, b
, d
ij
, and s
ij
sab
ij
=+
ij
ij
(1)
and
dab
ij
=−
ij
ij
(2)
Equations 1 and 2 indicate that the element in the ith row and jth column of [S]
is the sum of the elements at the same location in [A] and [B], and the one in [D]
is to be calculated by subtracting the one in [B] from that in [A] at the same location.
To obtain all elements in the sum matrix [S] and the difference matrix [D], the index
i runs from 1 to M and the index j runs from 1 to N.
In the case of
vector
} is directed
from the origin of the x-y coordinate axes, point O, to the point 1 on the x-axis
which has coordinates (x
1
1
,y
1
) = (4,0) and the other vector {V
2
} is directed from the
origin O to the point 2 on the y-axis which has coordinates (x
,y
) = (0,3). One may
2
2
} which is the vector directed from
the origin to the point 3 whose coordinates are (x
} + {V
1
2
,y
) = (4,3), or, one may want to
3
3
} which is the vector directed from the
origin O to the point 4 whose coordinates are (x
} – {V
1
2
,y
) = (4,–3). In fact, the vector
4
4
}
which is a vector directed from the origin O to the point 5 whose coordinates are
(x
} to the negative image of {V
}, namely {V
1
2
2–
5
,y
5
). Mathematically, based on Equations 1 and 2, we can have:
© 2001 by CRC Press LLC
matica
for i = 1 to M and j = 1 to N, respectively,
then the elements in [S] and [D] are to be calculated with the equations:
ij
addition and subtraction, only one column is involved (N =
1). As an example of addition and subtraction of two vectors, consider the two
vectors in a two-dimensional space as shown in Figure 1 , one vector {V
want to find the resultant of {R} = {V
find the difference vector {D} = {V
{D} can be obtained by adding {V
139177448.003.png
{} = {} + {} =
1
2
4
0
+
0
3
=
4
3
and
{} = {} {} =
1
2
4
0
0
3
=
4
3
} but are not on either one of the coordinate axes, such
as {D} and {E} in Figure 1 , we then have the sum vector {F} = {D} + {E} which
has components of 1 and –2 units along the x- and y-directions, respectively. Notice
that O467 forms a parallelogram in Figure 1 and the two vectors {D} and {E} are
the two adjacent sides of the parallelogram at O. To find the sum vector {F} of {D}
and {E} graphically, we simply draw a diagonal line from O to the opposite vertex
of the parallelogram — this is the well-known
1
}, {V
2
}, and {V
2–
.
It should be evident that to write out a vector which has a large number of rows
will take up a lot of space. If this vector can be rotated to become from one column
to one row, space saving would then be possible. This process is called transposition
as we will be leading to it by first introducing the length of a vector.
For the calculation of the
Law of Parallelogram
length
of a two-dimensional or three-dimensional vector,
} in Figure 1 , it would be a simple matter because they are
oriented along the directions of the coordinate axes. But for the vectors such as {R}
1
} and {V
2
FIGURE 1.
Two vectors in a two-dimensional space.
© 2001 by CRC Press LLC
RV V
DV V
When Equation 1 is applied to two arbitrary two-dimensional vectors which
unlike {V
such as {V
139177448.004.png
and {D} shown in Figure 1 , the calculation of their lengths would need to know the
components
of these vectors in the coordinate axes and then apply the
Pythagorean
= 3 units along
the x- and y-axis, respectively, its length, here denoted with the symbol
. Since the vector {R} has components equal to r
x
= 4 and r
y
, is:
{} =+
[ ]
2
2
05
.
=+
[ ]
2 2 05
43 5
.
=
(3)
y
, its length is to be calculated with the
following formula obtained from extending Equation 3 from two-dimensions to N-
dimensions:
1
through v
N
{} =++…+
[
2
2
2
]
0.
(4)
1
2
For example, a three-dimensional vector has components v
1
= v
x
= 4, v
2
= v
y
=
= 13.
We shall next show that Equation 4 can also be derived through the introduction of
the multiplication rule and transposition of matrices.
= v
= 12, then the length of this vector is
{V}
= [4
2
+ 3
2
+ 12
2
]
0.5
3
z
1.2 MULTIPLICATION OF MATRICES
A matrix [A] of order L (rows) by M (columns) and a matrix [B] of order M
by N can be multiplied in the order of [A][B] to produce a new matrix [P] of order
L by N. [A][B] is said as [A]
post-multiplied
by [B], or, [B]
pre-multiplied
by [A].
The elements in [P] denoted as p
ij
for i = 1 to N and j = 1 to M are to be calculated
by the formula:
M
p
=
a b
(5)
ij
ik kj
k
=
1
in the ith row and jth column
of the product matrix [P] is to be calculated by multiplying the elements in the ith
row of the matrix [A] by the corresponding elements in the jth column of the matrix
[B]. It is therefore evident that the number of elements in the ith row of [A] should
be equal to the number of elements in the jth column of [B]. In other words, to
apply Equation 5 for producing a product matrix [P] by multiplying a matrix [A]
on the right by a matrix [B] (or, to say multiplying a matrix [B] on the left by a
matrix [A]), the number of columns of [A] should be equal to the number of row
of [B]. A matrix [A] of order L by M can therefore be post-multiplied by a matrix
[B] of order M by N; but [A] cannot be pre-multiplied by [B] unless L is equal to N!
As a numerical example, consider the case of a square, 3
ij
3 matrix post-
multiplied by a rectangular matrix of order 3 by 2. Since L = 3, M = 3, and N = 2,
the product matrix is thus of order 3 by 2.
×
© 2001 by CRC Press LLC
theorem
Rr r
x
To facilitate the calculation of the length of a generalized vector {V} which has
N components, denoted as v
Vvv N
3, and v
Equation 5 indicates that the value of the element p
139177448.005.png
123
456
789
6
3
16 2 5 34
46 55 64
76 85 94
() +
()
13 22 31
43 52 61
7
() + () + ()
() + () + ()
5
2
=
() +
() +
()
4
1
() +
() +
()
() + () + ()
38291
61012
++ −−−
++ −−−
++ −−−
343
28
10
=
24 25 24
12 10 5
=
73
27
42 40 32
21 16 9
114
46
More exercises are given in the Problems listed at the end of this chapter for
the readers to practice on the matrix multiplications based on Equation 5.
It is of interest to note that the square of the length of a vector {V} which has
N components as defined in Equation 4,
{V}
2
T
which is a row matrix of order
1 by N (one row and N columns). That is:
{} = {}{} =++…+
2
T
1
2
v
2
(6)
1
2
3
where the row index i ranges from 1
to L and the column index j ranges from 1 to M, the transpose of this matrix when
its elements are designated as t
For a L-by-M matrix having elements e
ij
where the row index
r ranges from 1 to M and the column index c ranges from 1 to M because this
transpose matrix is of order M by L. As a numerical example, here is a pair of a
3
rc
will have a value equal to e
cr
×
2 matrix [G] and its 2
×
3 transpose [H]:
6
3
6 5 4
321
[] =
G
5
2
and
[] = [] =
G
T
−−−
32
×
4
1
23
If the elements of [G] and [H] are designated respectively as g
ij
and h
ij
, then
= –1, and
so on. There will be more examples of applications of Equations 5 and 6 in the
ensuing sections and chapters.
Having introduced the transpose of a matrix, we can now conveniently revisit
the addition of {D} and {E} in Figure 1 in algebraic form as {F} = {D} + {E} =
[4 –3]
= g
. For example, from above, we observe that h
= g
= 5, h
= g
ij
ji
12
21
23
32
. The resulting sum vector is indeed
correct as it is graphically verified in Figure 1 . The saving of space by use of
transposes of vectors (row matrices) is not evident in this case because all vectors
are two-dimensional; imagine if the vectors are of much higher order.
Another noteworthy application of matrix multiplication and transposition is to
reduce a system of linear algebraic equations into a simple, (or, should we say a
single)
T
+ [–3 1]
T
= [4+(–3) –3+1]
T
= [1 –2]
T
. For example, if we have three unknowns x, y, and z which
are to be solved from the following three linear algebraic equations:
matrix equation
© 2001 by CRC Press LLC
() +
, can be obtained by application of
Equation 5 to {V} and its transpose denoted as {V}
VVVv v
H
×
h
139177448.001.png
Zgłoś jeśli naruszono regulamin