0% found this document useful (0 votes)
16 views9 pages

MA1522 Tutorial1 Solutions

This document contains a tutorial on Linear Algebra for Computing, focusing on solving linear equations and systems, including unique and infinite solutions. It also discusses the implications of inconsistent systems and provides examples of both linear and non-linear equations. Additionally, it explores the concept of traffic flow in networks and the conditions under which various systems of equations can have solutions.

Uploaded by

Ling Jun Ming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views9 pages

MA1522 Tutorial1 Solutions

This document contains a tutorial on Linear Algebra for Computing, focusing on solving linear equations and systems, including unique and infinite solutions. It also discusses the implications of inconsistent systems and provides examples of both linear and non-linear equations. Additionally, it explores the concept of traffic flow in networks and the conditions under which various systems of equations can have solutions.

Uploaded by

Ling Jun Ming
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

NATIONAL UNIVERSITY OF SINGAPORE

Department of Mathematics

MA1522 Linear Algebra for Computing Tutorial 1

1. (a) Find a linear equation in the variables x and y that has a general solution x = 1+2t
and y = t where t is an arbitrary parameter.

Solution: One such linear equation is x − 2y = 1.

(b) Show that x = t and y = 12 t − 12 , where t is an arbitrary parameter, is also a general


solution for the equation constructed in part (a).

Solution: If we set x = t, then y = 12 (t − 1).

2. Find a linear equation in the variables x, y, and z that has a general solution

 x = 3 − 4s + t
y = s s, t ∈ R .
z = t

Solution: Replacing y = s and z = t into the first equation, get x + 4y − z = 3.

3. Solve the following linear systems.

(a) 
 3x1 + 2x2 − 4x3 = 3
2x1 + 3x2 + 3x3 = 15
5x1 − 3x2 + x3 = 14

Solution:
     
3 2 −4 3 5 2
R3 − 3 R1 ,R2 − 3 R1
3 2 −4 3 19
R3 + R2
3 2 −4 3
2 3 3 15 −−−→ −−−−−−−→ 0 35 17
3
13 −−−−5−→ 0 53 17 3
13 
19 23 146 292
5 −3 1 14 0 −3 3
9 0 0 5 5
   
5
R3 ,3R2
3 2 −4 3 3 2 −4 3 1
R2 R1 −2R2 R1 +4R3
R −17R3
−−−−−→ 0 5 17 39 −−2−−−→
−146 0 5 0 5 −5−→ −−−−→−−−−→
0 0 1 2 0 0 1 2
   
3 0 0 9 1R 1 0 0 3
1
0 1 0 1 −3−→ 0 1 0 1
0 0 1 2 0 0 1 2

System has a unique solution x1 = 3, x2 = 1, x3 = 2.


(b) 
 a + b − c − 2d = 0
2a + b − c + d = −2
−a + b − 3c + d = 4

Solution: The reduced row-echelon form of the augmented matrix is


 
1 0 0 3 −2
 0 1 0 − 19
2
2 .
0 0 1 − 92 0

So a general solution to the system is a = −2 − 3s, b = 2 + 19s


2
,c = 9s
2
,d = s, s ∈ R.

(c) 
 x − 4y + 2z = −2
x + 2y − 2z = −3
x − y = 4

Solution: The linear system is inconsistent. Its reduced row-echelon form is


 
1 0 −2/3 0
 0 1 −2/3 0 .
0 0 0 1

4. Determine the values of a and b so that the linear system



 ax + bz = 2
ax + ay + 4z = 4
ay + 2z = b

(a) has no solution;


(b) has only one solution;
(c) has infinitely many solutions and a general solution has one arbitrary parameter;
(d) has infinitely many solutions and a general solution has two arbitrary parameters.

Solution:    
a 0 b 2 a 0 b 2
a a 4 4 → 0 a 4 − b 2 .
0 a 2 b 0 0 b−2 b−2
Case 1: b ̸= 2.    
a 0 b 2 a 0 0 2−b
→ 0 a 4 − b 2 → 0 a 0 b − 2
0 0 1 1 0 0 1 1
If a = 0, system is inconsistent. If a ̸= 0, system has a unique solution.
Case 2: b = 2.  
a 0 2 2
→ 0 a 2 2 .
0 0 0 0
If a = 0, then system has infinitely many solutions with two free variables. If a ̸= 0,
then system has infinitely many solution with one free variable.
We summarize our findings.

(a) a = 0 and b ̸= 2: No solution;

(b) a ̸= 0 and b ̸= 2: Unique solution;

(c) a ̸= 0 and b = 2: Infinitely many solution with one free variable;

(d) a = 0 and b = 2: Infinitely many solution with two free variables.

5. (a) Does an inconsistent linear system with more unknowns than equations exist?
Solution: Yes, for example

x + y + z = 0
x + y + z = 1

(b) Does a linear system which has only one solution, but more equations than un-
knowns, exist?
Solution: Yes, for example

 x + y = 0
x − y = 0
2x + 4y = 0

(c) Does a linear system which has only one solution, but more unknowns than equa-
tions, exists?
Solution: No. A linear system with more unknowns than equations will either
have no solution or infinitely many solutions.

(d) Does a linear system which has infinitely many solutions, but more equations than
unknowns, exists?
Solution: Yes, for example

 x + y = 1
2x + 2y = 2
3x + 3y = 3

6. Solve the following system of non-linear equations:
x2 − y 2 + 2z 2 = 6
2x2 + 2y 2 − 5z 2 = 3
2x2 + 5y 2 + z 2 = 9

Solution: Let X = x2 , Y = y 2 , Z = z 2 , then the system of non-linear equations above


is converted to a system of linear equations

X − Y + 2Z = 6
2X + 2Y − 5Z = 3
2X + 5Y + Z = 9

The augmented matrix is


   
1 −1 2 6 1 0 0 4
 2 2 −5 3  −→  0 1 0 0  .
2 5 1 9 0 0 1 1

The solution is x2 = X = 4, y 2 = Y = 0, z 2 = Z = 1, and hence, x = ±2, y = 0, z = ±1


are solutions to the system of non-linear equations.

A network of one-way streets of a downtown section can be represented by the diagram


below, with traffic flowing in the direction indicated. The average hourly volume of traffic
entering and leaving this section during rush hour is given in the diagram.

300 200 100


500 A x1 B x2 C 600

x3 x4 x5
400 D x6 E x7 F 450

350 600 400

(a) Do we have enough information to find the traffic volumes x1 , x2 , x3 , x4 , x5 , x6 , and x7 ?

Solution: No, there are 6 equations (junctions), but 7 unknowns.

x1 + x3 = 800
x1 − x2 + x4 = 200
x2 − x5 = 500
x3 + x6 = 750
− x4 − x6 + x7 = −600
x5 − x7 = −50
 
1 0 0 0 0 −1 0 50
0
 1 0 0 0 0 −1 450 

0 0 1 0 0 1 0 750 
In fact, the RREF is  , which shows that we need 2
0
 0 0 1 0 1 −1 600 

0 0 0 0 1 0 −1 −50
0 0 0 0 0 0 0 0
parameters.

The general solution is x1 = 50 + s, x2 = 450 + t, x3 = 750 − s, x4 = 600 − s + t,


x5 = t − 50, x6 = s, x7 = t.

(b) Suppose x6 = 50 and x7 = 100. What is x1 , x2 , x3 , x4 , and x5 ?

Solution: We have s = x6 = 50 and t = x7 = 100 in the solution of Part (a). Hence


x1 = 100, x2 = 550, x3 = 700, x4 = 650, x5 = 50.

(c) Can the road between junction A and B be closed for construction while still keeping
the traffic flowing in the same directions on the other streets? Explain.

Solution: No. From the solution of Part(a) x1 = 50 + s. If AB is closed, then x1 = 0


and s = −10. In that case, x6 = s = −50 so the traffic along DE is flowing in the
opposition direction.
Extra problems
1. The following is the reduced row-echelon form of the augmented matrix of a linear
system:  
a b c d
 0 e f g ,
0 0 h k
where a, b, c, d, e, f, g, h, k are constants. Suppose the solution set of this system is rep-
resented by a line that passes through the origin and the point (1, 1, 1). Find the values
of a, b, c, d, e, f, g, h, k. Justify your answer.

Solution: As the line passes through the origin and the point (1, 1, 1), we have d = g =
h = k = 0 and a + b + c = 0, e + f = 0. Since the row-echelon form must have two
nonzero rows (so that the solutions form a line in the xyz-space), e ̸= 0. Finally, the
augmented matrix is in reduced row-echelon form, we get a = e = 1, b = 0 and hence
f = c = −1.

2. Determine which of the following statements are true. Justify your answer.

(a) A homogeneous system can have a non-trivial solution.

Solution: True. For example,



x − z = 0
y − z = 0

The point (1, 1, 1) is a solution.

(b) A non-homogeneous system can have a trivial solution.

Solution: False. Given a system of linear equations




 a11 x1 + a12 x2 + · · · + a1n xn = b1
 a21 x1 + a22 x2 + · · · + a2n xn = b2

..


 .
 a x
m1 1 + am2 x2 + · · · + amn xn = bm

substituting x1 = x2 = · · · = xn = 0, we have b1 = b2 = · · · = bm = 0, and hence


the system is homogeneous.

(c) If a homogeneous system has the trivial solution, then it cannot have a non-trivial
solution.

Solution: False. Use the example in (a).


(d) If a homogeneous system has a non-trivial solution, then it cannot have a trivial
solution.
Solution: False. Every homogeneous system has the trivial solution.

(e) If a homogeneous system has a unique solution, then the solution has to be trivial.
Solution: True, since the trivial solution is always a solution.

(f) If a homogeneous system has the trivial solution, then the solution has to be unique.

Solution: False. Use the example in (a).

(g) If a homogeneous system has a non-trivial solution, then there are infinitely many
solutions to the system.
Solution: True. Any multiple of an non-trivial solution to a homogeneous system
is solution too. More precisely, if (a, b, c) is a non-trivial solution, then (ka, kb, kc)
for any real number k is also a solution.

3. (Application) Electrical networks provides information about power sources, such as


batteries, and devices powered by these sources, such as light bulbs or motors. A power
source ‘forces’ a current of electrons to flow through the network, where it encounters
various resistors, each of which requires that a certain amount of force be applied in
order for the current to flow through it.
The fundamental law of electricity is Ohm’s law, which states exactly how much force E
is needed to drive a current I through a resistor with resistance R. Ohm’s law states
E = IR, in other words, force = current × resistance. Here, force is measured in volts,
resistance in ohms and current in amperes.
The following two laws (discovery due to Kirchhoff), govern electrical networks. The
first is a ‘conservation of flow’ law at each node; the second is a ‘balancing of votage’
law around each loop.
(Kirchoff ’s Current Law (KCL)) At each node, the sum of the currents flowing into
any node is equal to the sum of the currents flowing out of that node. For example, in
the diagram below, by KCL, we have I1 = I2 + I3 .

I2

I1
I3

(Kirchoff ’s Voltage Law (KVL)) In one traversal of any closed loop, the sum of the
voltage rises equals to the sum of the voltage drops.
In circuits with multiple loops and batteries there is usually no way to tell in advance
which way the currents are flowing, so the usual procedure in circuit analysis is to
assign arbitrary directions to the current flows in the branches and let the mathematical
computations determine whether the assignments are correct. In addition to assigning
directions to the current flows, Kirchoff’s Voltage Law requires a direction of travel for
each closed loop. The choice is arbitrary, but for the sake of consistency we will always
take this direction to be clockwise. We will also make the following conventions:

• A voltage drop occurs at a resistor if the direction assigned to the current through
the resistor is the same as the direction assigned in the loop, and a voltage rise
occurs at a resistor if the direction assigned to the current through the resistor is
the opposite to that assigned in the loop.
• A voltage rise occurs at a battery if the direction assigned to the loop is from −
to + through the battery, and a voltage drop occurs at a battery if the direction
assigned to the loop is from + to − through the battery.

If we follow these conventions when calculating currents, then those currents whose
directions were assigned correctly will have positive values and those whose direction
were assigned incorrectly will have negative values.
For each of the following circuits, use KCL and KVL to write down a linear system with
equations involving variables I1 , I2 , . . .. Solve the linear system by Gaussian Elimination.

I1 I2
I3

5Ω 20 Ω 10 Ω
50 volts 30 volts

(a)

Solution: The linear system is



 I1 + I2 − I3 = 0
5I1 + 20I3 = 50
− 10I2 − 20I3 = 30

Solving by Gaussian elimination, we have I1 = 6, I2 = −5 and I3 = 1. Hence the


actual direction of the current I2 is in the opposite direction from what is shown in
the figure.
5 volts
I1 I1

1Ω

2Ω
I2 I2

4Ω

I3 I3

8 volts
(b)

Solution: The linear system is



 I1 − I2 + I3 = 0
I1 + 2I2 = 5
2I2 + 4I3 = 8

Solving by Gaussian elimination, we have I1 = 1, I2 = 2, I3 = 1. So the actual


direction of all the currents are in the from direction as shown in the figure.

You might also like