Section 12.5 (6th edition)

load(vect);

Example 5: Find an equation of the plane that passes through the points P[1,3,2], Q[3,-1,6], and R[5,2,0]

PQ: [3,-1,6] - [1,3,2];

PR: [5,2,0] - [1,3,2];

nn: express(PQ~PR);

expand(nn.([x,y,z] - [1,3,2]) = 0);

Is a linear equation of the plane uniquely determined? Not necessarily.

ratsimp(%/2);

Example 7: The line of intersection of the planes x + y + z = 1 and x - 2y + 3z = 0.
(a) Find the angle between the two planes.

nn: [1,1,1];

mm: [1,-2,3];

acos(nn.mm/sqrt((nn.nn)*(mm.mm)));

float(%);

float(%/%pi*180);

The direction of the line can be found via the cross product
of normal vectors of the two planes.

express(nn~mm);

It is easy to find the point belonging to the two planes when z = 0.
linsolve: linsolve([x+y=1, x-2*y=5],[x,y]) solves the system of linear equations.

linsolve([x+y+z=1,x-2*y+3*z=1,z=0],[x,y,z]);

Example 8: Find the distance between 10x + 2y - 2z = 5 and 5x + y - z = 1.

nn: [5,1,-1];

Observe that [1/2,0,0] is a point in the first plane.

abs(nn.[1/2,0,0]-1)/sqrt(nn.nn);

Instead, you could choose [0,0,-5/2] in the first plane, for example.

abs(nn.[0,0,-5/2]-1)/sqrt(nn.nn);

Example 3 and 9: (a) Determine whether the lines [1,-2,4] + t*[1,3,-1] and [0,3,-3] + s*[2,1,4]
are parallel, skew or intersecting. (b) Find the distance between them.
Define the two lines L and M with direction vectors aa and bb.

L: [1,-2,4] + t*[1,3,-1];

M: [0,3,-3] + s*[2,1,4];

Solve the system of linear equations: L[1]=M[1], L[2]=M[2], L[3]=M[3]. The function linsolve() can find the solution for [s,t] if there is a solution. Otherwise, it returns the empty set [].

linsolve([L[1]=M[1],L[2]=M[2],L[3]=M[3]], [s,t]);

(b) Consider the plane ax + by + cz + d = 0 which contains the line M, and is parallel to the line L. Then find the distance between [1,-2,4] and the plane.

nn: express([1,3,-1]~[2,1,4]);

d: -nn.[0,3,-3];

abs(nn.[1,-2,4] + d)/sqrt(nn.nn);

*Exercise 38: Find the plane that contains the line of intersection of
x - z = 1 and y + 2z = 3 and is perpendicular to x + y - 2z = 1.

Find the point rr and the direction aa for the line of intersection.

linsolve([x-z=1, y+2*z=3, z=0], [x,y,z]);

aa: express([1,0,-1]~[0,1,2]);

Find the normal nn for the plane of interest

nn: express(aa~[1,1,-2]);

expand(nn.[x-1,y-3,z]=0);

expand(%/3);

*Exercise 62: Let [1,1,0] + t*[1,-1,2] and [2,0,2] + s*[-1,1,0] be two lines.
(a) Find the point rr of the intersection.

aa: [1,-1,2]; bb: [-1,1,0];

L: [1,1,0] + t*aa; M: [2,0,2] + s*bb;

linsolve([L[1]=M[1],L[2]=M[2],L[3]=M[3]], [s,t]);

rr: L, t=1;

(b) Find the normal nn of the plane that contains these lines.

nn: express(aa~bb);

expand(nn.([x,y,z]-rr)=0);

expand(%/2);