# Perpendicular vector in 6th dimensional space

1. Apr 17, 2012

### Sorento7

I am working on a software for analysis of brain connections using MRI.

Please suggest the simplest way to find a vector which is:

perpendicular to a unit vector that is positioned in the coordinate center,

it should be in the 2D plane containing the given vector and a given point on the unit 5-sphere.

Everything takes place in 6 dimensional Euclidean space.

2. Apr 18, 2012

### Fredrik

Staff Emeritus
This should work:

Denote the two given unit vectors by u and v. First we find an orthonormal basis {f,g} for the 2-dimensional subspace spanned by {u,v}. Define g=v. The orthogonal projection of u onto the 1-dimensional subspace spanned by g is <g,u>g. Let's denote this vector by p. The vector u-p will be orthogonal to g. So we define $f=(u-p)/\|u-p\|$.

Now we can write u=af+bg, where a=<f,u> and b=<g,u>. Define w=bf-ag. This w is orthogonal to u.