## Microsoft Interview Question

• 0

Comment hidden because of low score. Click to expand.
0
of 0 vote

Dot product = Sum (xi*yi), i=0..n
Cross product = matrix determinant (http://en.wikipedia.org/wiki/Cross_product)

from site: http://members.tripod.com/~Paul_Kirby/vector/Vplane.html
a plane formula is calculated by its normal:
Let a, b, c be the position vectors of 3 points in the plane. Then all we have to do to find the equation of the plane is construct a normal vector - then we can use this and any of the 3 points to find the equation as before.
The two vectors,
b - a (A to B)
c - a (A to C)
both lie in the plane, so if we take their cross product we find our normal vector:
n = (b - a) x (c - a) => cross product
the distance between the plane and the point is:
from :http://www-math.mit.edu/~djk/18_022/chapter02/example01.html
lets set p to be a point in the space, than:
((p-a),n)/(n,n)

Form the vector p - a and take its dot product with n divided by the magnitude of n.
The magnitude of the result will be the required distance.

Comment hidden because of low score. Click to expand.
0
of 0 vote

Comment hidden because of low score. Click to expand.
0
of 0 vote

say A,B,C are the points on plane, find the cross product ABXBC to get the normal vector say [n1, n2, n3] be it. And then find the plane equation by n1*x + n2*y + n3*z + n4 = 0. (by substituting one of A,B,C get n4).

distance is |n1*x1+..|/Sqrt(n1^2+..)

Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

### Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

### Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.