2
$\begingroup$

Given a unit vector in spherical coordinates, \begin{align*} \mathbf{n}(\theta, \phi) = \begin{bmatrix} \cos\theta\sin\phi\\ \sin\theta\sin\phi\\ \cos\phi \end{bmatrix}, \end{align*} does anyone know of an elegant way for me to utilise the angles $\theta$ and $\phi$ to compute two orthonormal vectors to $\mathbf{n}$? Preferably without having to used cross-products.

$\endgroup$
4
  • $\begingroup$ Why wouldn't you want to use cross products? It seems like the most natural way to proceed here. (After finding one orthogonal vector to $\mathbf n$, find the other one by taking their cross product.) $\endgroup$
    – YiFan
    Dec 23, 2019 at 23:15
  • 1
    $\begingroup$ Because the orthonormal vector features in the construction of an objective function that is to be minimised. The function is highly non-linear already, considering the trigonometric terms. But when the orthonormal vectors are computed using cross products, they also need to be normalised, so this introduces square root terms in the denominator that are also functions of $\theta$ and $\phi$. So I'm just wondering if there's a way of computing the orthonormal vectors so as to not introduce the normalisation term into the objective function. $\endgroup$
    – niran90
    Dec 23, 2019 at 23:24
  • $\begingroup$ I think you don't need to worry about that; if you can identify an orthonormal vector $\mathbf v$ to $\mathbf n$ by "eye power" then taking the cross product $\mathbf v\times\mathbf n$, the result is already normalised. (See my answer for details.) $\endgroup$
    – YiFan
    Dec 23, 2019 at 23:27
  • $\begingroup$ It looks to me like you’re actually working in Cartesian coordinates here. The vector $\mathbf n$ might be parameterized by azimuth and colatitude on the unit sphere, but the coordinate vector that you’ve presented is in the standard Cartesian basis. $\endgroup$
    – amd
    Dec 23, 2019 at 23:50

2 Answers 2

1
$\begingroup$

It is clear that the unit vector $\mathbf v=[-\sin\theta,\cos\theta,0]^T$ will be orthogonal to $\mathbf n$ since you can verify that $\mathbf v\cdot\mathbf n=0$. To find a unit vector orthogonal to these two just compute the cross product, namely $$\mathbf v\times\mathbf n=\begin{vmatrix}\hat\imath&\hat\jmath&\hat k\\-\sin\theta&\cos\theta&0\\\cos\theta\sin\phi&\sin\theta\sin\phi&\cos\phi\end{vmatrix}=\begin{bmatrix}\cos\theta\cos\phi\\\sin\theta\cos\phi\\-\sin\phi\end{bmatrix}.$$ You can easily check that this is also a unit vector, and that $(\mathbf v\times\mathbf n)\cdot\mathbf v=(\mathbf v\times\mathbf n)\cdot\mathbf n=0$.

$\endgroup$
2
  • 1
    $\begingroup$ Oh wow, thanks so much for this! This is exactly what I'm looking for! $\endgroup$
    – niran90
    Dec 23, 2019 at 23:30
  • $\begingroup$ Glad to help!${}$ $\endgroup$
    – YiFan
    Dec 23, 2019 at 23:55
1
$\begingroup$

You can use an orthonormal vector on the equator,

$$ \pmatrix{\sin\theta\\-\cos\theta\\0}\;, $$

and

$$ \pmatrix{\cos\theta\cos\phi\\\sin\theta\cos\phi\\-\sin\phi}\;. $$

$\endgroup$
1
  • 1
    $\begingroup$ Thanks for this! $\endgroup$
    – niran90
    Dec 23, 2019 at 23:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .