0

I have $3$ equation with $3$ unknowns $(i, j, k)$ while $a, b, c, d, e$ and $f$ are known.

$$ai + bj + ck = 1\\ di + ej + fk = 1\\ i^2 + j^2 + k^2 = 1$$

This type of equation set is typical for unit vector solving problems. So I need to find the vector $(i, j, k).$

How can I solve this?

TShiong
  • 1,257
Vefa o
  • 11
  • If the first two equations are identical, there can be zero, $1,$ or infinitely many solutions. Otherwise, there are at most two solutions, but th equation can have $1$ or $0$ solutions, or even. If the first two equations are different, they define a line, and you are trying to find where the line intersects a sphere. – Thomas Andrews Jan 14 '23 at 19:48
  • İ have two known unit vectors let say a and b . İ need to find a third vector which is c as defined as (i, j, k). i know the angle between a and c (this gives the first eq.) and the angle between b and c (this gives the second eq.) and the third one is the unit vector eq. of c. İ just i neeed to locate a unit vector with given two unit vectors and their angles to third vector. So this will give two solution vector on both sides of a b vector plane . – Vefa o Jan 14 '23 at 20:05
  • Don't reuse variables $a,b$ for vectors when your question has them as scalars. $u,v,w$ are good vector names. – Thomas Andrews Jan 14 '23 at 20:23
  • Sorry i am a newbie. Thank you for clarifying. – Vefa o Jan 14 '23 at 20:41
  • Using spherical coordinates for (x,y,z) gives a straightforward solution with interesting understanding of angular information. – Jean Marie Jan 14 '23 at 21:42
  • Good point @jeanMarie. Third equation gives a hint for this approach. – Vefa o Jan 14 '23 at 21:57
  • I think this equation set is also needed for other computational geometry problems. – Vefa o Jan 14 '23 at 22:03

2 Answers2

2

Solve the first equation for $i$. Substitute this in the second equation. Solve the second equation for $j$. Substitute this in the expression for $i$. Substitute both $i$ and $j$ in the third equation. Then you are left with a quadratic equation in $k$. Solve the quadratic equation for $k$. This gives you $i$, $j$, $k$.

Matija
  • 3,526
  • 1
    [+1] A little caveat : the first action is possible if $a\ne 0$ ; therefore a way to say it is : "among the three coefficients $a,b,c$, one of them at least is non-zero. Let us assume, up to a renaming of the unknowns, that it is the first one $a$" – Jean Marie Jan 14 '23 at 21:38
  • 1
    That's true, of course, and also holds for the second equation. However, I wanted to focus on the approach, not the "pathological" cases. Working through these case distinctions, and the ones for the determinant, and considering the explicit formulas, is obviously necessary for a comprehensive, formally proven, answer, but in this case I decided to go with the conceptual solution, thus also omitting explicit results. Of course, this can be done and canonically extends to $n\ge 1$ dimensions, with a linear system of equations and the normalization constraint. – Matija Jan 14 '23 at 21:57
  • @Matija thank you for assistance. I calculated the coefficients to construct the quadratic equation to extract k. – Vefa o Jan 14 '23 at 22:47
1

This will at least let you know how many solutions to expect.

Write these in terms of the dot product. Let $x=(i,j,k)$ and $v=(a,b,c)$ and $w=(d,e,f).$ Assume $w\neq v.$

Then your equations are:

$$x\cdot v=x\cdot w=x\cdot x=1.$$

So $x$ is perpendicular to $w-v.$

If $\theta_v$ is the angle between vectors $x$ and $v,$ then:

$$c_v=\cos(\theta_v)=\frac1{\|v\|}$$

You also have, for a similar $\theta_w$

$$c_w=\cos(\theta_w)=\frac1{\|w\|}$$

An interesting restriction is that you need $$\|v\|,\|w\|\geq 1.\tag 1$$

Since the cosines are positive, both angles are less than $\frac\pi2.$

If $\alpha$ is the angle between $v,w$ then $\alpha\leq \theta_v+\theta_w,$ and $$c_{vw}=\cos\alpha =\frac{v\cdot w}{\|v\|\cdot\|w\|}$$

Since cosine is strictly decreasing on $[0,\pi]$ you need:

$$c_{vw} \geq c_vc_w-\sqrt{(1-c_v^2)(1-c_w^2)}\tag2$$

You need $(1)$ and $(2)$ to be true for there to be any solutions.

All of these values can be computed directly from $a,b,c,d,e,f.$

If you have equality in $(2),$ you get one solution.

If you get strict inequality in $(2)$ you get two answers.


$(2)$ is equivalent to:

$$\sqrt{(\|v\|^2-1)(\|w\|^2-1)}\geq 1-v\cdot w\tag3$$

If $v\cdot w\geq 1,$ then the right side is not positive, so $(3)$ is true.

Otherwise, if $v\cdot w<1,$ then we can square both sides and get:

$$(\|v\|^2\|w\|^2-(\|v\|^2+\|w\|^2) \geq (v\cdot w)^2-2(v\cdot w)$$

So we need $v\cdot v\geq 1, w\cdot w\geq 1,$ and either $v\cdot w\geq 1,$ or

$$(v\cdot v)(w\cdot w)-(v\cdot w)^2 \geq (v+w)\cdot (v+w)\tag4$$

Thomas Andrews
  • 177,126