Você está na página 1de 12

APPENDIX

Matrix Algebra for


A Structural Analysis

A.1 Basic Definitions and Types


of Matrices
With the accessibility of desk top computers, application of matrix algebra
for the analysis of structures has become widespread. Matrix algebra
provides an appropriate tool for this analysis, since it is relatively easy to
formulate the solution in a concise form and then perform the actual
matrix manipulations using a computer. For this reason it is important
that the structural engineer be familiar with the fundamental operations
of this type of mathematics.

Matrix. A matrix is a rectangular arrangement of numbers having m


rows and n columns.The numbers, which are called elements, are assembled
within brackets. For example, the A matrix is written as:

a11 a12 a1n


a21 a22 a2n
A = D T
o
am1 am2 amn

Such a matrix is said to have an order of m * n (m by n). Notice that the


first subscript for an element denotes its row position and the second
subscript denotes its column position. In general, then, aij is the element
located in the ith row and jth column.

Row Matrix. If the matrix consists only of elements in a single row,


it is called a row matrix. For example, a 1 * n row matrix is written as

A = [a1 a2 an]

Here only a single subscript is used to denote an element, since the row
subscript is always understood to be equal to 1, that is, a1 = a11, a2 = a12,
and so on.

612
A.1 BASIC DEFINITIONS AND TYPES OF MATRICES 613

Column Matrix. A matrix with elements stacked in a single column


is called a column matrix. The m * 1 column matrix is

a1
a2
A = D T
o
am

Here the subscript notation symbolizes a1 = a11, a2 = a21, and so on.

Square Matrix. When the number of rows in a matrix equals the


number of columns, the matrix is referred to as a square matrix. An
n * n square matrix would be

a11 a12 a1n


a21 a22 a2n
A = D T
o
an1 an2 ann

Diagonal Matrix. When all the elements of a square matrix are


zero except along the main diagonal, running down from left to right, the A
matrix is called a diagonal matrix. For example,

a11 0 0
A = C0 a22 0 S
0 0 a33

Unit or Identity Matrix. The unit or identity matrix is a diagonal


matrix with all the diagonal elements equal to unity. For example,

1 0 0
I = C0 1 0S
0 0 1

Symmetric Matrix. A square matrix is symmetric provided


aij = aji. For example,

3 5 2
A = C5 -1 4S
2 4 8
614 APPENDIX A M AT R I X A L G E B R A FOR S T R U C T U R A L A N A LY S I S

A.2 Matrix Operations


Equality of Matrices. Matrices A and B are said to be equal if
they are of the same order and each of their corresponding elements are
equal, that is, aij = bij. For example, if

A = c d B = c d
2 6 2 6
4 -3 4 -3

then A = B.

Addition and Subtraction of Matrices. Two matrices can be


added together or subtracted from one another if they are of the same
order. The result is obtained by adding or subtracting the corresponding
elements. For example, if

-5
A = c d B = c d
6 7 8
2 -1 1 4

then

-1
A + B = c d A - B = c d
A 1 15 11
3 3 1 -5

Multiplication by a Scalar. When a matrix is multiplied by a


scalar, each element of the matrix is multiplied by the scalar. For
example, if

A = c d
4 1
k = -6
6 -2

then

-24 -6
kA = c d
-36 12

Matrix Multiplication. Two matrices A and B can be multiplied


together only if they are conformable. This condition is satisfied if the
number of columns in A equals the number of rows in B. For example, if

A = c d B = c d
a11 a12 b11 b12 b13
(A1)
a21 a22 b21 b22 b23

then AB can be determined since A has two columns and B has two rows.
Notice, however, that BA is not possible. Why?
A.2 MATRIX OPERATIONS 615

If matrix A having an order of 1m * n2 is multiplied by matrix B


having an order of 1n * q2 it will yield a matrix C having an order of
1m * q2, that is,

A B = C

1m * n21n * q2 1m * q2

The elements of matrix C are found using the elements aij of A and bij
of B as follows:

n
cij = a aikbkj (A2)
k=1

The methodology of this formula can be explained by a few simple


examples. Consider

2
A = c d
2 4 3
B = C6S
-1 6 1 A
7

By inspection, the product C = AB is possible since the matrices are


conformable, that is, A has three columns and B has three rows. By
Eq. A2, the multiplication will yield matrix C having two rows and one
column. The results are obtained as follows:
c11: Multiply the elements in the first row of A by corresponding elements
in the column of B and add the results; that is,

c11 = c1 = 2122 + 4162 + 3172 = 49

c21: Multiply the elements in the second row of A by corresponding


elements in the column of B and add the results; that is,

c21 = c2 = - 1122 + 6162 + 1172 = 41

Thus

C = c d
49
41
616 APPENDIX A M AT R I X A L G E B R A FOR S T R U C T U R A L A N A LY S I S

As a second example, consider

5 3
B = c d
2 7
A = C 4 1S
-3 4
-2 8

Here again the product C = AB can be found since A has two columns
and B has two rows. The resulting matrix C will have three rows and two
columns. The elements are obtained as follows:

c11 = 5122 + 31-32 = 1 1first row of A times first column of B2


c12 = 5172 + 3142 = 47 1first row of A times second column of B2
c21 = 4122 + 11-32 = 5 1second row of A times first column of B2
c22 = 4172 + 1142 = 32 1second row of A times second column of B2
c31 = - 2122 + 81- 32 = - 28 1third row of A times first column of B2
c32 = - 2172 + 8142 = 18 1third row of A times second column of B2

The scheme for multiplication follows application of Eq. A2. Thus,

1 47
A
C = C 5 32 S
-28 18

Notice also that BA does not exist, since written in this manner the
matrices are nonconformable.
The following rules apply to matrix multiplication.
1. In general the product of two matrices is not commutative:

AB Z BA (A3)

2. The distributive law is valid:

A1B + C2 = AB + AC (A4)

3. The associative law is valid:

A1BC2 = 1AB2C (A5)

Transposed Matrix. A matrix may be transposed by interchanging


its rows and columns. For example, if

a11 a12 a13


A = C a21 a22 a23 S B = [b1 b2 b3]
a31 a32 a33
A.2 MATRIX OPERATIONS 617

Then

a11 a21 a31 b1


A = C a12
T
a22 a32 S B = C b2 S
T

a13 a23 a33 b3

Notice that AB is nonconformable and so the product does not exist.


(A has three columns and B has one row.) Alternatively, multiplication
ABT is possible since here the matrices are conformable (A has three
columns and BT has three rows). The following properties for transposed
matrices hold:

1A + B2T = AT + BT (A6)

1kA2T = kAT (A7)

1AB2T = BTAT (A8)

This last identity will be illustrated by example. If

A = c d B = c d
6 2 4 3
1 -3 2 5
A
Then, by Eq. A8,

3 T
ac dc db = c dc d
6 2 4 4 2 6 1
1 -3 2 5 3 5 2 -3
28 T -2
ac db = c d
28 28
-2 -12 28 -12
-2 -2
c d = c d
28 28
28 -12 28 -12

Matrix Partitioning. A matrix can be subdivided into submatrices


by partitioning. For example,

a11 a12 a13 a14


a24 S = c d
A11 A12
A = C a21 a22 a23
A21 A22
a31 a32 a33 a34

Here the submatrices are

A11 = [a11] A12 = [a12 a13 a14]

A21 = c d A22 = c d
a21 a22 a23 a24
a31 a32 a33 a34
618 APPENDIX A M AT R I X A L G E B R A FOR S T R U C T U R A L A N A LY S I S

The rules of matrix algebra apply to partitioned matrices provided the


partitioning is conformable. For example, corresponding submatrices of A
and B can be added or subtracted provided they have an equal number of
rows and columns. Likewise, matrix multiplication is possible provided
the respective number of columns and rows of both A and B and their
submatrices are equal. For instance, if
4 1 -1 2 -1
A = C -2 0 -5 S B = C0 8S
6 3 8 7 4
then the product AB exists, since the number of columns of A equals the
number of rows of B (three). Likewise, the partitioned matrices are
conformable for multiplication since A is partitioned into two columns
and B is partitioned into two rows, that is,
A B + A12B21
AB = c dc d = c 11 11 d
A11 A12 B11
A21 A22 B21 A21B11 + A22B21
Multiplication of the submatrices yields
4 1 2 -1
A11B11 = c dc d = c d
8 4
-2 0 0 8 -4 2
-1 -7 -4
A A12B21 = c d[7 4] = c c d
-5 -35 -20
2 -1
A21B11 = [6 3] c d = [12 18]
0 8
A22B21 = [8][7 4] = [56 32]

-7 -4
c d + c d
8 4
1 0
-4 2 -35 - 20
AB = D T = C - 39 -18 S
[12 18] + [56 32] 68 50

A.3 Determinants
In the next section we will discuss how to invert a matrix. Since this
operation requires an evaluation of the determinant of the matrix, we will
now discuss some of the basic properties of determinants.
A determinant is a square array of numbers enclosed within vertical
bars. For example, an nth-order determinant, having n rows and n
columns, is
a11 a12 a1n
a21 a22 a2n 4
A = 4 (A9)
o
an1 an2 ann
A.3 DETERMINANTS 619

Evaluation of this determinant leads to a single numerical value which


can be determined using Laplaces expansion. This method makes use of
the determinants minors and cofactors. Specifically, each element aij of a
determinant of nth order has a minor Mij which is a determinant of order
n - 1. This determinant (minor) remains when the ith row and jth column
in which the aij element is contained is canceled out. If the minor is
multiplied by 1-12i + j it is called the cofactor of aij and is denoted as
Cij = 1-12i + jMij (A10)
For example, consider the third-order determinant
a11 a12 a13
3 a21 a22 a23 3
a31 a32 a33
The cofactors for the elements in the first row are

C11 = 1-121 + 1 ` ` = ` 22 `
a22 a23 a a23
a32 a33 a32 a33

= 1-121 + 2 ` 21 ` = - ` 21 `
a a23 a a23
C12
a31 a33 a31 a33

= 1-121 + 3 ` 21 ` = ` 21 `
a a22 a a22
C13
a31 a32 a31 a32
A
Laplaces expansion for a determinant of order n, Eq. A9, states that
the numerical value represented by the determinant is equal to the sum
of the products of the elements of any row or column and their respective
cofactors, i.e.,
D = ai1Ci1 + ai2Ci2 + + ainCin 1i = 1, 2, , or n2
or (A11)
D = a1jC1j + a2jC2j + + anjCnj 1j = 1, 2, , or n2
For application, it is seen that due to the cofactors the number D is defined
in terms of n determinants (cofactors) of order n - 1 each. These
determinants can each be reevaluated using the same formula, whereby
one must then evaluate 1n - 12 determinants of order 1n - 22, and so
on. The process of evaluation continues until the remaining determinants
to be evaluated reduce to the second order, whereby the cofactors of the
elements are single elements of D. Consider, for example, the following
second-order determinant

D = ` `
3 5
-1 2
We can evaluate D along the top row of elements, which yields
D = 31 -121 + 1122 + 51-121 + 21- 12 = 11
Or, for example, using the second column of elements, we have
D = 51-121 + 21-12 + 21-122 + 2132 = 11
620 APPENDIX A M AT R I X A L G E B R A FOR S T R U C T U R A L A N A LY S I S

Rather than using Eqs. A11, it is perhaps easier to realize that the
evaluation of a second-order determinant can be performed by
multiplying the elements of the diagonal, from top left down to right, and
subtract from this the product of the elements from top right down to
left, i.e., follow the arrow,

D = ` ` = 3122 - 51-12 = 11
3 5
-1 2

N
Consider next the third-order determinant

1 3 -1
D = 3 4 2 63
-1 0 2

Using Eq. A11, we can evaluate D using the elements either along the
top row or the first column, that is

D = 1121- 121 + 1 ` ` + 1321- 121 + 2 ` ` + 1- 121- 121 + 3 ` `


2 6 4 6 4 2
0 2 -1 2 -1 0
= 114 - 02 - 318 + 62 - 110 + 22 = - 40
A
-1 -1
D = 11-121 + 1 ` ` + 41- 122 + 1 ` ` + 1- 121- 123 + 1 ` `
2 6 3 3
0 2 0 2 2 6
= 114 - 02 - 416 - 02 - 1118 + 22 = - 40

As an exercise try to evaluate D using the elements along the second row.

A.4 Inverse of a Matrix


Consider the following set of three linear equations:

a11 x1 + a12 x2 + a13 x3 = c1


a21 x1 + a22 x2 + a23 x3 = c2
a31 x1 + a32 x2 + a33 x3 = c3

which can be written in matrix form as

a11 a12 a13 x1 c1


C a21 a22 a23 S C x2 S = C c2 S (A12)
a31 a32 a33 x3 c3

Ax = C (A13)
A.4 INVERSE OF A MATRIX 621

One would think that a solution for x could be determined by dividing C


by A; however, division is not possible in matrix algebra. Instead, one
multiplies by the inverse of the matrix. The inverse of the matrix A is
another matrix of the same order and symbolically written as A-1. It has
the following property,
AA-1 = A-1A = I
where I is an identity matrix. Multiplying both sides of Eq. A13 by A-1,
we obtain
A-1Ax = A-1C
Since A-1Ax = Ix = x, we have
x = A-1C (A14)
-1
Provided A can be obtained, a solution for x is possible.
For hand calculation the method used to formulate A-1 can be
developed using Cramers rule. The development will not be given here;
instead, only the results are given.* In this regard, the elements in the
matrices of Eq. A14 can be written as

x = A-1C

x1 C11 C21 C31 c1


1 A
C x2 S = C C12 C22 C32 S C c2 S (A15)
A
x3 C13 C23 C33 c3

Here A is an evaluation of the determinant of the coefficient matrix A,


which is determined using the Laplace expansion discussed in Sec. A.3.
The square matrix containing the cofactors Cij is called the adjoint matrix.
By comparison it can be seen that the inverse matrix A-1 is obtained from
A by first replacing each element aij by its cofactor Cij, then transposing
the resulting matrix, yielding the adjoint matrix, and finally multiplying the
adjoint matrix by 1> A .
To illustrate how to obtain A-1 numerically, we will consider the
solution of the following set of linear equations:

x1 - x2 + x3 = - 1
-x1 + x2 + x3 = - 1 (A16)
x1 + 2x2 - 2x3 = 5

Here
1 -1 1
A = C -1 1 1S
1 2 -2

*See Kreyszig, E., Advanced Engineering Mathematics, John Wiley & Sons, Inc., New York.
622 APPENDIX A M AT R I X A L G E B R A FOR S T R U C T U R A L A N A LY S I S

The cofactor matrix for A is

-1 -1
` ` - ` ` ` `
1 1 1 1
2 -2 1 -2 1 2
-1 -1
C = F- ` ` ` ` - ` `V
1 1 1 1
2 -2 1 -2 1 2
-1 -1
` ` - ` ` ` `
1 1 1 1
1 1 -1 1 -1 1

Evaluating the determinants and taking the transpose, the adjoint


matrix is

-4 0 -2
CT = C - 1 -3 -2 S
-3 -3 0

Since

1 -1 1
A = -1 1 1 = -6
A 1 2 -2

The inverse of A is, therefore,

-4 0 -2
1
A-1 = - C -1 -3 -2 S
6
-3 -3 0

Solution of Eqs. A16 yields

x1 -4 0 -2 -1
1
C x2 S = - C - 1 -3 - 2 S C -1 S
6
x3 -3 -3 0 5

x1 = - 16[1-421 -12 + 01- 12 + 1-22152] = 1

x2 = - 16[1-121 -12 + 1- 321 -12 + 1- 22152] = 1

x3 = - 16[1-321 -12 + 1- 321 -12 + 102152] = - 1

Obviously, the numerical calculations are quite expanded for larger


sets of equations. For this reason, computers are used in structural
analysis to determine the inverse of matrices.
A.5 THE GAUSS METHOD FOR SOLVING SIMULTANEOUS EQUATIONS 623

A.5 The Gauss Method for Solving


Simultaneous Equations
When many simultaneous linear equations have to be solved, the Gauss
elimination method may be used because of its numerical efficiency.
Application of this method requires solving one of a set of n equations
for an unknown, say x1, in terms of all the other unknowns, x2, x3, , xn.
Substituting this so-called pivotal equation into the remaining equations
leaves a set of n - 1 equations with n - 1 unknowns. Repeating the
process by solving one of these equations for x2 in terms of the n - 2
remaining unknowns x3, x4, , xn forms the second pivotal equation.
This equation is then substituted into the other equations, leaving a set
of n - 3 equations with n - 3 unknowns. The process is repeated until
one is left with a pivotal equation having one unknown, which is then
solved. The other unknowns are then determined by successive back
substitution into the other pivotal equations. To improve the accuracy of
solution, when developing each pivotal equation one should always select
the equation of the set having the largest numerical coefficient for the
unknown one is trying to eliminate. The process will now be illustrated by
an example.
Solve the following set of equations using Gauss elimination:
A
-2x1 + 8x2 + 2x3 = 2 (A17)
2x1 - x2 + x3 = 2 (A18)
4x1 - 5x2 + 3x3 = 4 (A19)
We will begin by eliminating x1. The largest coefficient of x1 is in
Eq. A19; hence, we will take it to be the pivotal equation. Solving for x1,
we have
x1 = 1 + 1.25x2 - 0.75x3 (A20)
Substituting into Eqs. A17 and A18 and simplifying yields
2.75x2 + 1.75x3 = 2 (A21)
1.5x2 - 0.5x3 = 0 (A22)
Next we eliminate x2. Choosing Eq. A21 for the pivotal equation since
the coefficient of x2 is largest here, we have
x2 = 0.727 - 0.636x3 (A23)
Substituting this equation into Eq. A22 and simplifying yields the final
pivotal equation, which can be solved for x3. This yields x3 = 0.75.
Substituting this value into the pivotal Eq. A23 gives x2 = 0.25. Finally,
from pivotal Eq. A20 we get x1 = 0.75.

Você também pode gostar