Solving Linear Algebraic Equations using Matrix Inverse and Cramer's Rule - Prof. David Al, Study notes of Mechanical Engineering

A step-by-step solution to a linear algebraic equation using matrix inverse and cramer's rule. The example problem is based on a truss structure with six unknowns. The calculation of the coefficient matrix, right-hand side constants, matrix inverse, and the solution for one unknown using cramer's rule.

Typology: Study notes

Pre 2010

Uploaded on 11/08/2009

koofers-user-0y4
koofers-user-0y4 🇺🇸

10 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Solution to Linear Algebraic Equations
Matrix form
[A] {X} = {B}
Truss example from class
initialize all elements in the A matrix to 0
i05..:= j05..:= Aij, 0:=
A
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
=
copy the matrix above, fill in the nonzero elements, and redefine A:
c30 cos 30 deg():= s30 sin 30 deg():=
c60 cos 60 deg():= s60 sin 60 deg():=
A
c30
s30
c30
s30
0
0
0
0
1
0
1
0
c60
s60
0
0
c60
s60
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
:= B
0
1000
0
0
0
0
:=
coefficient matrix right-hand side constants
Matrix Inverse
XA
1B:= X
500
433.013
866.025
0
250
750
=
pf3

Partial preview of the text

Download Solving Linear Algebraic Equations using Matrix Inverse and Cramer's Rule - Prof. David Al and more Study notes Mechanical Engineering in PDF only on Docsity!

Solution to Linear Algebraic Equations

Matrix form [A] {X} = {B}

Truss example from class initialize all elements in the A matrix to 0 i := 0 .. 5 j := 0 .. 5 A (^) i j, := 0

A

copy the matrix above, fill in the nonzero elements, and redefine A: c30 := cos 30 deg( ⋅ ) s30 :=sin 30 deg( ⋅ ) c60 := cos 60 deg( ⋅ ) s60 :=sin 60 deg( ⋅ )

A

−c − s c s 0 0

c −s 0 0 −c s

:= B

coefficient matrix right-hand side constants

Matrix Inverse

X := A −^1 ⋅B X

check inverse results:

A X⋅

1 × 10 3

−2.842 × 10 −^14

= A A⋅ − 1

example equation (row 2 [row 1 in 0-based MathCAD]) − s30 ⋅X 0 − s60 X ⋅ 2 = 1 × 10 3

Cramer's Rule to solve for the 2nd unknown x 2 (X 1 in MathCAD), replace the 2nd column with B in the numerator:

x (^2)

−c − s c s 0 0

c −s 0 0 −c s

      A

:= x 2 =

shortcut way to do this in MathCAD: start with the coefficient matrix (i.e., initialize the numerator matrix) N :=A replace the 2nd column with the constant vector

N〈 〉 1 :=B

N

1 × 10 3