Practice Problems 7

Lecture 7: Solving Systems of Linear Equations

Problem numbers refer to the textbook (Chiang & Wainwright, 4th edition). These are not graded, but you should attempt them all before the quiz. Try each question yourself first, then expand the Solution to check.

Exercise 5.4

6. Solve the system Ax=d by matrix inversion, where

  1. 4x+3y=282x+5y=42
Solution

A=[4325]v=[xy]b=[2842] ∵Av=b⇒A−1Av=A−1b⇒v=A−1b

|A|=20−6=14

A−1=114[5−3−24] v=A−1b=114[5−3−24][2842]=114[140−126−56+168]=114[14112]=[18]
So x=1 and y=8.

  1.  4x1+x2−5x3=8−2x1+3x2+x3=123x1−x2+4x3=5
Solution

A=[41−5−2313−14]x=[x1x2x3]b=[8125]

|A|=4|31−14|−1|−2134|−5|−233−1|=4(12+1)−1(−8−3)−5(2−9)=52+11+35=98 adjA=[1311611316−7714] x=A−1b=198[1311611316−7714]3×3[8125]3×1=198[19649098]3×1=[251]

Exercise 5.5

1. Use Cramer’s rule to solve the following equation systems:

  1. 3x1−2x2=62x1+x2=11
Solution

A=[3−221]→|A|=7b=[611]
By Cramer’s Rule:

A1=[6−2111]→|A1|=28A2=[36211]→|A2|=21x1∗=|A1||A|=287=4x2∗=|A2||A|=217=3

Taking the inverse:

A−1=1|A|adj=17[12−23][x1∗x2∗]=A−1b=17[12−23][611]=17[2821]=[43]

  1. −x1+3x2=−34x1−x2=12
Solution

A=[−134−1]→|A|=−11b=[−312]

By Cramer’s rule:

|A1|=|−3312−1|=−33→x1∗=−33−11=3|A2|=|−1−3412|=0→x2∗=0−11=0

By taking the inverse:

[x1∗x2]=−111[−1−3−4−1][−312]=−111[−330]=[30]

  1. 8x1−7x2=9x1+x2=3
Solution

|A|=|8−711|=15|A1|=|9−731|=30→x1∗=3015=2|A2|=|8913|=15→x2∗=1515=1 Alternatively, [x1∗x2∗]=115[17−18][93]=[21]

  1. 5x1+9x2=147x1−3x2=4
Solution

|A|=|597−3|=−78|A1|=|1494−3|=−78→x1∗=1|A2|=|51474|=−78→x2∗=1

Alternatively, [x12x2∗]=−178[−3−9−75][144]=[11]

2. For each of the equation systems in Prob. 1, find the inverse of the coefficient matrix, and get the solution by the formula x∗=A−1d.

Solution

Solved together with Prob. 1 above: for each part, invert the coefficient matrix A and compute x∗=A−1d; the workings in the previous solution show both routes give the same x∗.

3. Use Cramer’s rule to solve the following equation systems:

  1.  8x1−x2=162x2+5x3=52x1+3x3=7
Solution

|A|=|8−10025203|=8|2503|−1|0523|=48−10=38

|A1|=|16−10525703|16|2503|−(−1)|5573|=96−20=76x1∗=7638=2

|A2|=|8160055273|=8|5573|−16|0523|=8×−20−16×−10=−160+160=0x2∗=0

|A3|=|8−116025207|=8|2507|+1|0527|+16|0220|=112−10−64=38→x3∗=1

  1.  −x+y+z=ax−y+z=bx+y−z=c
Solution

|A|=|−1111−1111−1|=1|−111−1|−1|111−1|+1|1−111|=0+2+2=4

|A1|=|a11b−11c1−1|=a|−111−1|−1|b1c−1|+1|b−1c1|=0−(−b−c)+(b+c)=2(b+c)\vspace1em|A2|=|−1a11b11c−1|=−1|b1c−1|−a|111−1|+1|1b1c|=−1(−b−c)−a(−1−1)+1(c−b)=b+c−2a+c−b=2(a+c)\vspace1em|A3|=|−11a1−1b11c|=−1|−1b1c|−1|1b1c|+a|1−111|=−1(−c−b)−1(c−b)+2a=c+b−c+b+2a=2(a+b)

x∗=b+c2y∗=a+c2z∗=a+b2