[R] How to get the normal direction to a plane?

Douglas Bates bates at stat.wisc.edu
Sat Jul 3 13:35:59 CEST 2004


Fred wrote:

> Dear All
>  
> Maybe the following is a stupid question.
> Assume I have 3 coordinate points (not limited to be in 2D or 3D space)
> a, b, c.
> It is known that these 3 points will define a plane.
> The problem is how to get the normal direction that is orthogonal to
> this plane.
>  
> Is there an easy way to calculate it using the values of a, b, and c?

In the general problem of k vectors of length n, create the n by k-1 
matrix of differences v_i - v_k for i = 1,...,k-1, take its QR 
decomposition, and form Q.  The last n + 1 - k columns of Q are 
orthogonal to the affine subspace that contains the k original points.




More information about the R-help mailing list