**Linear Algebra Modules Project**

**Chapter 1, Module 1**

**Geometric Perspectives On Linear Equations**

Purpose of this module

The purpose of this module is to give you experience interpreting linear equations and their solutions geometrically. You will work with systems of linear equations in two and three unknowns, since their solutions can be pictured as points in the plane and in 3-space. The main question to investigate is: What are the possible solution sets for a system of linear equations in 2 or 3 unknowns?

`> `
**restart: with(linalg): with(plots): with(lamp):**

Warning, new definition for norm

Warning, new definition for trace

`> `

**Tutorial**

Section 1. Linear Equations in Two Unknowns

We begin by looking at a single linear equation in two unknowns:

This is the equation of a line in the plane, provided the coefficients
*a*
and
*b *
are not both zero. In Example 1A, we use Maple to solve two such equations simultaneously and to look at their common solutions.

==================

**Example 1A:**
Solve simultaneously the following system of linear equations:

Then plot the two lines, and find the location of the solution on the plot.

**Solution:**
We define the Maple variables eqn1 and eqn2 to be the two equations. Then we use the solve(..) command to solve the two equations simultaneously.

`> `
**eqn1 := x+4*y=6;**

`> `
**eqn2 := 3*x-y=5;**

`> `
**solve({eqn1,eqn2},{x,y});**

So
is the unique solution of the given system of two equations. Next we plot the two lines by first solving each equation for
*y*
in terms of
*x*
.

`> `
**y1 := solve(eqn1,y);
y2 := solve(eqn2,y);**

`> `
**plot({y1,y2},x=-5..5,y=-5..5);**

`> `

Note that the two lines intersect at the point (2, 1), as we expected. You can also use the special command drawlines(..) to plot the lines without first having to solve each equation for
*y*
:

`> `
**drawlines([eqn1,eqn2]);**

`> `

==================

**Exercise 1.1:**
(a) Replace the second equation above (the one called eqn2) by a new equation so that the system {eqn1, eqn2} has no solutions. But choose the coefficients of
*x *
and
* y*
so they are not both zero. Check your answer by applying the solve(..) command to your new system.

(b) How are your two lines related to one another geometrically? How are their coefficients related to one another algebraically?

**Warning**
: When Maple's solve(..) command finds no solutions to a system of equations, it simply returns
__no output__
*.*

Student Workspace

Answer 1.1

We can find a new eqn2 by using the same coefficients of
*x*
and
*y*
as in eqn1 (and hence creating a line with the same slope) but changing the right side:

`> `
**eqn2 := x + 4*y = 0;**

Let's verify that the new system has no solution and that the two lines are parallel:

`> `
**solve({eqn1,eqn2},{x,y});**

Maple gave no response to the solve(..) command because it found no solutions.

`> `
**drawlines([eqn1,eqn2]);**

`> `

Now let's consider three equations in two unknowns. First, let's go back to the original two equations; then we'll consider what can happen when we include a third equation.

`> `
**eqn1 := x+4*y=6;
eqn2 := 3*x-y=5;**

`> `

**Exercise 1.2:**
Create a third equation (call it eqn3) so the system {eqn1, eqn2, eqn3} has a unique solution, but no two of the three lines are equal.

Student Workspace

Answer 1.2

Choose the third line so it goes through the point of intersection ( ) of the first two lines. For example:

`> `
**eqn3 := x-2*y=0;**

`> `
**solve({eqn1,eqn2,eqn3},{x,y});**

`> `
**drawlines([eqn1,eqn2,eqn3]);**

`> `

Section 2. Linear Equations in Three Unknowns

A single linear equation in three unknowns

is the equation of a plane in 3-space, provided the coefficients
*a*
,
*b*
, and
*c*
are not all zero. In Example 2A, we use Maple to solve two such equations simultaneously and to look at their common solutions:

====================

**Example 2A:**
Solve simultaneously the following system of linear equations:

Then plot the two planes, and find the location of the solution on the plot.

**Solution:**

`> `
**eqn1 := x+2*y+3*z=3;
eqn2 := 2*x-y-4*z=1;**

`> `
**solve({eqn1,eqn2},{x,y,z});**

So the system of equations has infinitely many solutions:
. In this representation of the solutions we refer to
*z*
as the "free" variable, because
*z*
can have any value and each value of
*z*
determines a solution of the system. For example if
, then
and
, and so (
) is a solution to each of the original two equations. Geometrically, the solution set is a parametric representation of the line of intersection of the two planes.

Now let's plot the two planes and look for this line of intersection. As a first step, we solve each equation for
*z*
.

`> `
**z1 := solve(eqn1,z);
z2 := solve(eqn2,z);**

`> `
**p1 := plot3d(z1,x=-5..5,y=-5..5,color=blue,style=patchnogrid):
p2 := plot3d(z2,x=-5..5,y=-5..5,color=green,style=patchnogrid):
display([p1,p2],scaling=constrained);**

`> `

Click on the picture, and then rotate it in 3-space. Try to orient the picture so you are looking right along the line of intersection. (If you find this difficult, use the toolbar and type in the values 127 degrees for and 122 degrees for .) Experiment with some of the other plotting options on the toolbar.

We use Maple's spacecurve(..) command to draw the line of intersection. (We changed the name of the parameter from
*z*
to the more traditional
*t*
.) Adding this to the previous picture of the two planes provides us with a visual check of our solution.

`> `
**p3 := spacecurve([t+1,-2*t+1,t],t=-4..4,color=red,thickness=2):
display([p1,p2,p3]);**

`> `

====================

We can obtain this picture with less effort by using the drawplanes(..) command, which is similar to the drawlines(..) command:

`> `
**drawplanes([eqn1,eqn2]);**

`> `

The drawplanes(..) command can also display the planes in another way that is sometimes easier to see:

`> `
**drawplanes([eqn1,eqn2],round=on);**

`> `

Here's how to interpret this picture. Imagine a sphere with center at the origin and radius 10, and imagine intersecting each plane with this sphere. You then see each of the circles of intersection. You also see the line of intersection (in red) of each pair of planes. Although representing a plane by a circle is somewhat unconventional, this picture is often easier to interpret than the conventional picture of a parallelogram representing a plane, especially when you have several intersecting planes.

`> `

**Exercise 2.1:**
(a) Replace the second equation above (the one called eqn2) by a new equation so that the system {eqn1, eqn2} has no solution. But choose the coefficients of
*x*
,
*y*
and
*z*
so they are not all zero.

(b) How are your two planes related to one another geometically? How are their coefficients related to one another algebraically?

(Recall that when Maple's solve(..) command finds no solutions, it simply returns
__no output__
.)

Student Workspace

Answer 2.1

We can find a new eqn2 by using the same coefficients for
*x*
,
*y*
, and
*z*
as in eqn1 (and hence creating a parallel plane) but changing the right side:

`> `
**eqn2 := x+2*y+3*z=-8;**

`> `
**solve({eqn1,eqn2},{x,y});**

Maple gave no response to the solve(..) command, because it found no solution. Rotate the figure produced by the drawplanes(..) command below until you can see the two parallel planes.

`> `
**drawplanes([eqn1,eqn2]);**

`> `

====================

**Example 2B:**
Now let's consider three equations in three unknowns. First, let's go back to the original two equations; then we'll consider what can happen when we include a third equation.

`> `
**eqn1 := x+2*y+3*z=3;
eqn2 := 2*x-y-4*z=1;**

`> `
**eqn3 := x+y-z=0;**

`> `
**solve({eqn1,eqn2,eqn3},{x,y,z});**

`> `

So this system has the unique solution ( ) = ( ), and therefore the three corresponding planes must have this single point in common. Look for this point in the two plots below:

`> `
**drawplanes([eqn1,eqn2,eqn3]);**

`> `
**drawplanes([eqn1,eqn2,eqn3],round=on);**

`> `

Of course, a system of three equations in three unknowns doesn't always have a unique solution, as the next exercise demonstrates.

====================

**Exercise 2.2:**
(a) Replace the third equation above (the one called eqn3) by a new equation so that the system {eqn1, eqn2, eqn3} has more than one solution, but no two of the three planes are equal.

(b) How is your third plane related geometrically to the line of intersection of the first two planes?

Student Workspace:

Answer 2.2

We find a new eqn3 by finding a plane that contains the line of intersection . One way to do this is to pick two points that lie on the line of intersection and pick a third point that does not lie on the line and also does not lie on either of the planes defined by eqn1 and eqn2. These three points determine a unique plane. For example, pick and to determine the points ( ) and ( ) on the line, and choose the third point to be ( ). The unique plane containing these three points is . (This might be a good time to review the techniques for finding equations of planes that you learned in your calculus course.)

`> `
**eqn3 := -x+y+3*z=0;**

`> `
**solve({eqn1,eqn2,eqn3},{x,y,z});**

Here is the picture:

`> `
**drawplanes([eqn1,eqn2,eqn3],round=on);**

`> `

Note the single line of intersection in the picture. This means that each pair of planes intersects in the same line.