View
6
Download
0
Category
Preview:
Citation preview
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Solution of Simultaneous Linear AlgebraicEquations
Mike Renfro
February 13, 2008
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Basic Form of the EquationsDetour: Multiplication in Matrix AlgebraSolution Types
Introduction
Systems of linear algebraic equations are common representationsof many engineering problems, especially problems involvingequilibrium of some sort:
Statics:∑
Fy = 0
Dynamics:∑
F = ma
Thermodynamics: min = mout
etc.
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Basic Form of the EquationsDetour: Multiplication in Matrix AlgebraSolution Types
Basic Form of the Equations
a11x1 + a12x2 + · · · + a1nxn = b1
a21x1 + a22x2 + · · · + a2nxn = b2
...
an1x1 + an2x2 + · · · + annxn = bn
Typical characteristics:
n equations, with nunknown variables.
Only linear terms involvingunknowns, no x2, sin(x), orother nonlinear termsallowed.
Particular unknowns may beomitted from someequations entirely, in whichcase the corresponding aij
coefficient is assumed to be0.
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Basic Form of the EquationsDetour: Multiplication in Matrix AlgebraSolution Types
Reformatted Form of the Equations
The system of equations
a11x1 + a12x2 + · · · + a1nxn = b1
a21x1 + a22x2 + · · · + a2nxn = b2
...
an1x1 + an2x2 + · · · + annxn = bn
can be rewritten asa11 a12 · · · a1n
a21 a22 · · · a2n...
an1 an2 · · · ann
x1
x2...xn
=
b1
b2...
bn
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Basic Form of the EquationsDetour: Multiplication in Matrix AlgebraSolution Types
Detour: Multiplication in Matrix Algebra
Two matrices [A] and [B] can be multiplied if and only if theyare conformable, that is, if the number of columns in [A] isequal to the number of rows in [B].
If [A] has m rows and n columns, and [B] has n rows and pcolumns, then their product [C ] will have m rows and pcolumns. For example, a 3 × 3 matrix can be multiplied by a3 × 1 vector, yielding a 3 × 1 vector.
The values in [C ] are found with the formulacij =
∑nk=1 aikbkj — multiply each element of the i ’th row of
[A] by the corresponding element of the j ’th column of [B],then sum the products.
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Basic Form of the EquationsDetour: Multiplication in Matrix AlgebraSolution Types
Matrix Multiplication Example
1 2 34 5 67 8 9
101112
Are these two matrices conformable? How many columns are in[A]? 3. How many rows are in {b}? 3. How large will the productmatrix be? [A] is 3 × 3, {b} is 3 × 1, so [A]{b} will be 3 × 1.
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Basic Form of the EquationsDetour: Multiplication in Matrix AlgebraSolution Types
Matrix Multiplication Example
1 2 34 5 67 8 9
101112
=
1 × 10 + 2 × 11 + 3 × 124 × 10 + 5 × 11 + 6 × 127 × 10 + 8 × 11 + 9 × 12
=
68167266
Compare to: a11 a12 a13
a21 a22 a23
a31 a32 a33
x1
x2
x3
=
a11x1 + a12x2 + a13x3
a21x1 + a22x2 + a23x3
a31x1 + a32x2 + a33x3
=
b1
b2
b3
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Basic Form of the EquationsDetour: Multiplication in Matrix AlgebraSolution Types
Solution Methods: Direct and Indirect
Direct solution methods can provide exact solutions to asystem of equations, assuming we can avoid roundoff andother numerical errors. However, these methods can be proneto substantial unavoidable errors under certain conditions.
Direct methods include Cramer’s rule, Gauss elimination, andLU decomposition.
Indirect solution methods are much simpler to program fromscratch, and arrive at a final solution by starting with aninitial guess and continually refining the guess until it satisfiesall the equations in the system. They are less prone toroundoff errors, but might not find a solution at all.
Indirect methods include the Jacobi and Gauss-Seidelmethods.
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Solution of Simultaneous Linear Algebraic Equations:Static Analysis of a Scaffolding
3 bars supported by 6 cablesform a simple scaffolding. Giventhe positions and magnitudes for3 loads applied to the bars, findthe tension in each cable.
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Governing Equations for Bar 1
Force equilibrium ∑Fy = 0
TA + TB − TC − TD − TF − P1 = 0
Moment equilibrium ∑M = 0
−9TB + TC + 4TD + 7TF + 5P1 = 0
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Governing Equations for Bar 2
Force equilibrium ∑Fy = 0
TC + TD − TE − P2 = 0
Moment equilibrium∑M = 0
−3TD + 2TE + P2 = 0
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Governing Equations for Bar 3
Force equilibrium∑Fy = 0
TE + TF − P3 = 0
Moment equilibrium∑M = 0
−4TF + P3 = 0
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Assembling Equations
At this point, we have six independent equations (two for eachbar), and six unknowns (cable tensions). Reformat the sixequilibrium equations to isolate the unknown tensions on theleft-hand side of the equations. Make sure the tension variables arein the same order in each equation:
TA +TB −TC −TD −TF = P1
−9TB +TC +4TD +7TF = −5P1
TC +TD −TE = P2
−3TD +2TE = −P2
TE +TF = P3
−4TF = −P3
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Matrix form setup
Make sure that the left-hand side of each equation containsnothing but unknowns and multipliers.
Make sure that each equation has the unknowns in the sameorder.
Make sure that the right-hand side of each equation containsnothing but known constants.
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Matrix form
Assuming n as the number of equations or unknowns in theproblem, make some space below for a matrix with n rows and ncolumns, a vector with n rows and 1 column, and another vectorwith n rows and 1 column as shown:
· · · · · ·· · · · · ·· · · · · ·· · · · · ·· · · · · ·· · · · · ·
······
=
······
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Filling out the matrix equation
1 Populate the unknowns vector with the list of unknownvariables.
2 Populate the right-hand side vector with the right-hand sidesof the equations.
3 Populate each row of the coefficient matrix with coefficientsfrom the left-hand side of the equations.
1 1 −1 −1 0 −10 −9 1 4 0 70 0 1 1 −1 00 0 0 −3 2 00 0 0 0 1 10 0 0 0 0 −4
TA
TB
TC
TD
TE
TF
=
P1
−5P1
P2
−P2
P3
−P3
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Detour: Determinants and RankRank and Determinant Example: Scaffolding
Basic Concepts of Solution
A homogeneous system of equations is one where {b} = {0}. Ithas a trivial solution of {x} = {0}, but only has a non-trivialsolution if the determinant of [A], |[A]| = 0.A non-homogeneous system of equations is one where {b} 6= {0}.It has a proper solution if and only if rank(A) = rank([A b]) = n,where n is the number of equations in the system.
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Detour: Determinants and RankRank and Determinant Example: Scaffolding
Detour: Determinants and Rank
The determinant of a square matrix is found by multiplying alongits diagonals, then adding and subtracting the products.∣∣∣∣[ 1 2
3 4
]∣∣∣∣ = (1 × 4) − (2 × 3) = −2
∣∣∣∣∣∣ 1 2 3
4 5 67 8 9
∣∣∣∣∣∣ =(1 × 5 × 9) +(2 × 6 × 7) +(3 × 4 × 8)−(1 × 6 × 8) −(2 × 4 × 9) −(3 × 5 × 7)
= 0
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Detour: Determinants and RankRank and Determinant Example: Scaffolding
Detour: Determinants and Rank
The rank of a matrix is the size of the largest square submatrix itcontains with a non-zero determinant.
rank
([1 23 4
])= 2
The 2× 2 matrix has a non-zero determinant itself, so its rank is 2.
rank
1 2 34 5 67 8 9
= 2
The 3 × 3 matrix has a zero determinant, but has several 2 × 2submatrices with non-zero determinants, including∣∣∣∣[ 1 2
4 5
]∣∣∣∣ = −3
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Detour: Determinants and RankRank and Determinant Example: Scaffolding
Rank and Determinant Example: Scaffolding
∣∣∣∣∣∣∣∣∣∣∣∣
1 1 −1 −1 0 −10 −9 1 4 0 70 0 1 1 −1 00 0 0 −3 2 00 0 0 0 1 10 0 0 0 0 −4
∣∣∣∣∣∣∣∣∣∣∣∣= −108
therefore, its rank is 6. The rank of [A b] is also 6, since the Amatrix itself is an easily-found submatrix with a non-zerodeterminant. Assuming that the {b} vector is non-zero, thescaffolding equation only has a solution ifrank([A b]) = rank(A) = n, where n is the number of equationsin the system (6).
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Homework
Consider the three-mass, four-spring system shown below.Expanding the equations of motion from
∑Fx = max for each
mass using its free-body diagram results in the followingdifferential equations:
x1 +
(k1 + k2
m1
)x1 −
(k2
m1
)x2 = 0
x2 −(
k2
m2
)x1 +
(k2 + k3
m2
)x2 −
(k3
m2
)x3 = 0
x3 −(
k3
m3
)x2 +
(k3 + k4
m3
)x3 = 0
where k1 = 10 N/m, k2 = k3 = 40 N/m, andm1 = m2 = m3 = m4 = 1 kg. Assuming values for x1 · · · x3 arealso known, reformat the system of equations in matrix form.
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
IntroductionApplications and Problem Setup: Scaffolding
Basic Concepts of SolutionHomework
Homework Figure
Mike Renfro Solution of Simultaneous Linear Algebraic Equations
Recommended