# Two Planes and one Point..

#### Problem:

Find the equation of the plane that passes through the line of intersection of the planes, x + y - z = 2 and 2x - y + 3z = 1 and passes throught the point (-1,2,1).

> Plane1 := x + y -z = 2; Plane2 := 2*x - y + 3*z = 1;

```                            Plane1 := x + y - z = 2

Plane2 := 2 x - y + 3 z = 1
```

> Line := solve({Plane1,Plane2},{x,y,z}); Point := vector([-1,2,1]);
```                Line := {y = 5/3 z + 1, x = - 2/3 z + 1, z = z}

Point := [ -1, 2, 1 ]
```

> p1 := subs(z=0,Line); p2 := subs(z=1,Line);
```                          p1 := {y = 1, x = 1, 0 = 0}

p2 := {1 = 1, y = 8/3, x = 1/3}
```

> p1 := vector([1,1,0]): p2 := vector([1/3,8/3,1]):
> n := crossprod(p1-Point,p2-Point);
```                            n := [ 2/3, -4/3, 8/3 ]
```

> r := vector([x,y,z]): ThePlane := innerprod(n, r-p1) = 0;
```                  ThePlane := 2/3 x + 2/3 - 4/3 y + 8/3 z = 0
```

> sort(",[x,y,z]); sort(",[x,y,z]);
```                        2/3 x - 4/3 y + 8/3 z + 2/3 = 0
```

> "*3;
```                            2 x - 4 y + 8 z + 2 = 0
```

 Pretty simple ha!

Link to the commands in this file
Carlos Rodriguez <carlos@math.albany.edu>