Cramer's Method for Linear Equations: Under/Over/Ill-Conditioned Systems, Slides of Calculus for Engineers

An in-depth exploration of cramer's method for solving systems of linear equations. Topics covered include defining linear algebraic equations, solving systems by hand using gaussian elimination and cramer's method, distinguishing between exactly determined, overdetermined, and underdetermined systems, and using matlab to solve systems. The document also discusses singular and ill-conditioned systems, as well as the minimum norm solution and existence and uniqueness of solutions.

Typology: Slides

2012/2013

Uploaded on 03/26/2013

abduu
abduu 🇮🇳

4.4

(49)

195 documents

1 / 39

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Learning Goals
Define Linear Algebraic Equations
Solve Systems of Linear Equation by Hand
using
Gaussian Elimination
Cramer’s Method
Distinguish between Equation System
Conditions: Exactly Determined,
Overdetermined, Underdetermined
Use MATLAB to Solve Systems of Eqns
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27

Partial preview of the text

Download Cramer's Method for Linear Equations: Under/Over/Ill-Conditioned Systems and more Slides Calculus for Engineers in PDF only on Docsity!

Learning Goals

  • Define Linear Algebraic Equations
  • Solve Systems of Linear Equation by Hand

using

  • Gaussian Elimination
  • Cramer’s Method
  • Distinguish between Equation System

Conditions: Exactly Determined,

Overdetermined, Underdetermined

  • Use MATLAB to Solve Systems of Eqns

Cramer’s Method for Eqn Sys

  • Solves equations using determinants.
  • Gives insight into the
    • existence and uniqueness of solutions
      • Identifies SINGULAR (a.k.a. Divide by Zero) Systems
    • effects of numerical inaccuracy
      • Identifies ILL-CONDITIONED (a.k.a. Stiff) Systems

Cramer’s Method – Illustrated-

  • Now, to Find The Individual Solns, Sub The Constraint Vector for the Variable Coefficients and Compute the Determinant for Each unknown, Dk
  • In this Example Find Dx , D (^) y, D (^) z as

50 4 22

3 6 2

33 9 12

− − − Dx =

8 4 22 50

3 6 2 3

21 9 12 33 − − + =

− + − =

− − = − x y z

x y z

x y z

8 50 22

3 3 2

21 33 12

− −

− − Dy =

8 4 50

3 6 3

21 9 33

− −

Dz =

Cramer’s Method – Illustrated-

  • Once We’ve Calculated all these Determinants, The Rest is Easy

 These Eqns Ilustrate the most UseFul Feature of Cramer’s Method

c

x D

D

x =

c

y D

D y =

c

z D

D

z =

Dc appears in all

THREE

Denominators

Cramer’s Method – Illustrated-

  • Calc the Determinants
  • First Recall The SIGN pattern for Determinants

Dc = 21 ( ) (^1) −^64 − 222 − 9 ( − 1 ) (^) −− 83 − 222 − 12 ( ) (^1) −− 83 −^64

 Find Dc

1146

2604 738 720

= − −

c

c D

D

[ ( ) (( ) ( ))] [( ) (( ) ( ))] 12 [( 3 ) ( 4 ) (( 8 ) 6 )]

9 3 * 22 8 * 2

21 6 * 22 2 * 4

= − − − − −

= + − − − −

Dc = − − −

 Dc is LARGE → WELL Conditioned System

Cramer’s Method – Illustrated-

  • Solve using MATLAB’s det Function >> EqnSys = [21 -9 -12 -33; -3 6 -2 3; -8 -4 22 50];

>> Dc = det(EqnSys(:,1:3)) Dc = 1146

>> Dx = det([EqnSys(:,4),EqnSys(:,2:3)])

Dx = 1146

>> Dy = det([EqnSys(:,1),EqnSys(:,4), EqnSys(:,3)]) Dy = 2292

All Row Elements of Cols 1-

All Row Elements of Cols 4, 2-

All Row Elements of Cols 1, 4, 3

Cramer vs Homogenous: Ax =^ b =^0

 In general, for a set of

HOMOGENEOUS linear algebraic

equations that contains the same

number of equations as unknowns

  • a nonzero solution exists only if the set is singular; that is, if Cramer’s determinant is zero
  • furthermore, the solution is not unique.
  • If Cramer’s determinant is not zero, the homogeneous set has a zero solution; that is, all the unknowns are zero

Cramer’s Rule Summary

  • Cramer’s determinant gives some insight into

ill-conditioned problems, which are close to

being singular.

  • A Cramer’s determinant

close to zero indicates an

ill-conditioned problem.

UnderDetermined Example-

  • A simple UnderDetermined

system is the equation x +^3 y =^6

 All we can do is solve for one of the

unknowns in terms of the other; for

example, x = 6 – 3y OR y = −x/3 + 2

  • An INFINITE number of (x,y) solutions satisfy this equation

UnderDetermined Example-

  • When there are more Unknowns than

Equations, the LEFT-DIVISION method will

give a solution with some of the unknowns

set equal to ZERO

  • For Example

 which

corresponds to

  • x = 0
  • y = 2

>>A = [1, 3]; b = 6; >>solution = A\b solution = 0 2

3 6 [ 1 3 ] (^)  = 6 

y

x x y

Minimum Norm Solution

  • When det( A ) = 0, We can use the

PSEUDOINVERSE method to find ONE

Solution, x , such that the Euclidean (or

Pythagorean) Length of x is MINIMIZED

  • In MATLAB:

2 2 3

2 2

2 x = min x 1 + x + x + xn

 MATLAB will return the MINIMUM

NORM SOLUTION →

x = pinv(A)*b

Existence and Uniqueness

  • The set Ax = b with m equations and n

unknowns has solutions if and only if

rank [ A ] = rank[ Ab ] ( ) 1

 Rank[ A ] is the maximum number of

LINEARLY INDEPENDENT rows of A

  • Linear Independence → No Row of A is a SCALAR multiple of ANY OTHER Combinations of Rows

Existence and Uniqueness

  • Recall Rank for m-Eqns & n-Unknwns

rank [ A ] = rank[ Ab ] ( ) 1

 Now Let r = rank[ A ]

  • If condition (1) is satisfied and if r = n , then the solution is unique
  • If condition (1) is satisfied but r < n , an infinite number of solutions exists and - r unknown variables can be expressed as linear combinations of the other n−r unknown variables, whose values are ARBITRARY

Homogenous Case

  • The homogeneous set Ax = 0 is a special case

in which b = 0

  • For this case rank[ A ] = rank[ Ab ] always, and

thus the system in all cases has the trivial

solution x = 0

  • A nonzero solution, in which at least one

unknown is nonzero, exists if and only if

rank[ A ] < n (n ≡ No. Unknowns)

  • If m < n, the homogeneous set always has a

nonzero solution