Quiz 4, Exercise #4
Contents
Find a point of intersection of the two planes.
Set up the augmented matrix for the system, then use Matlab's rref command to place the result in reduced row echelon form.
A=[1 2 -1 4;... 2, 1, -2 4]; format rat % rational arithmetic R=rref(A)
R =
1 0 -1 4/3
0 1 0 4/3
Determine the point of intersection from R
Note that R represents the system
x - z = 4/3
y = 4/3
z = free
If we let z = 0, the x = 4/3, y = 4/3, and z = 0 gives us the point of intersection P(4/3, 4/3, 0).
Find a vector in the direction of the line of intersection.
Take the cross product of vectors normal to each plane.
n1=[1 2 -1]; n2=[2 1 -2]; v=cross(n1,n2)
v =
-3 0 -3
Equation of the line
Let X=(x,y,z) be an arbitrary point on the line. The PX = t v is the equation of our line. Thus,
< x - 4/3, y - 4/3, z> = t < -3, 0, -3 >
The line has parametric equations
x = 4/3 - 3t
y = 4/3
z = -3t
Plot the planes
[x,y]=meshgrid(0:.2:3); z1=x+2*y-4; z2=(2*x+y-4)/2; phndl1=surf(x,y,z1); set(phndl1,'EdgeColor','none',... 'Facecolor',[0.7,0.7,0.7]); hold on phndl2=mesh(x,y,z2); set(phndl2,'EdgeColor','m');
Plot the line
t=linspace(-0.75,0.75); x=4/3-3*t; y=4/3*ones(size(t)); z=-3*t; lhndl=line(x,y,z); set(lhndl,'Linewidth',2,... 'Color','b');
Set the view and annotate
xlabel('x-axis') ylabel('y-axis') zlabel('z-axis') title('Intersection of x + 2y -z = 4 and 2x + y - 2z = 4') view(117,56)