4
$\begingroup$

I have three vectors in $e_i\in\mathbb{R}^3$ that form a triangle. Let us consider now the linear equation system $Ax=b$ with $$ A_{i,j} = \langle e_i, e_j\rangle^2,\\ b_i = \langle e_i, e_i\rangle. $$ I can solve these problems numerically, but somehow I feel I'm missing out. Perhaps the solution can even be constructed explicitly from $e_i$?

Any ideas?

$\endgroup$
5
  • $\begingroup$ Just a clarification of your notation. $A_{i,j}$ is a matrix whose element $a_{i,j}=\langle e_i,e_j\rangle^2$ and $b_j$ a vector whose $i$th element is the inner product $\langle e_i,e_i\rangle$? $\endgroup$ Jul 9, 2016 at 18:42
  • $\begingroup$ The elements of $A$ are $A_{i,j}$, the elements of $b$ are $b_i$. $\endgroup$ Jul 9, 2016 at 18:47
  • $\begingroup$ I would start by reviewing Numerical Linear Algebra by Lloyd N. Trefethen and David Bau. I have seeing these kind things but I don't regularly work in Numerical Analysis so I am just giving you the typical reference for such sort of problems. I think you will want to start by reading Cholesky decomposition if you have sufficient background to read the book. $\endgroup$ Jul 9, 2016 at 18:52
  • $\begingroup$ I am curious whether a solution $x$ has a nice geometric interpretation. $\endgroup$
    – Neal
    Jul 11, 2016 at 23:48
  • $\begingroup$ It has: It's the distance between the circumcenter and the edge midpoint divided by the triangle volume and the edge length. The number is negative the circumcenter it is on the "wrong" side of the edge (outside of the triangle). $\endgroup$ Jul 13, 2016 at 14:38

2 Answers 2

1
$\begingroup$

Just so you know, it is possible to write $P^T A P = D$ diagonal with the entries of $P$ being rational expressions in the entries of $A.$ If desired, we can take a diagonal matrix $Q$ involving square roots of the absolute values of the entries of $D$ to get $Q P^T A P Q = W,$ where $W$ is diagonal and all entries are $0,1,-1.$ Note that there is no need for $A$ to be positive, just symmetric.

Here is the idea in symbols; one may change the order of operations if convenient.

? m = [ a,f,e; f,b,d; e,d,c]
%1 = 
[a f e]

[f b d]

[e d c]

? m - mattranspose(m)
%2 = 
[0 0 0]

[0 0 0]

[0 0 0]


? p1 = [ 1, -f/a, -e/a; 0,1,0; 0,0,1] 
%6 = 
[1 -f/a -e/a]

[0 1 0]

[0 0 1]

? m1 = mattranspose(p1) * m * p1
%7 = 
[a 0 0]

[0 (b*a - f^2)/a (d*a - e*f)/a]

[0 (d*a - e*f)/a (c*a - e^2)/a]


? p2 = [ 1,0,0; 0,1, (a * d - e * f) / (f^2 - a * b); 0,0,1]
%9 = 
[1 0 0]

[0 1 (d*a - e*f)/(-b*a + f^2)]

[0 0 1]

? m2 = mattranspose(p2) * m1 * p2
%10 = 
[a 0 0]

[0 (b*a - f^2)/a 0]

[0 0 ((-c*b + d^2)*a + (c*f^2 - 2*d*e*f + b*e^2))/(-b*a + f^2)]

? m
%11 = 
[a f e]

[f b d]

[e d c]

? matdet(m)
%12 = (c*b - d^2)*a + (-c*f^2 + 2*d*e*f - b*e^2)
? 
$\endgroup$
0
$\begingroup$

Let's first assume that the triangle is in the $z=0$-plane. After some computation SymPy spits out

(b0*c0 + b1*c1)/(a0*a0*b1*c1 - a0*a1*b0*c1 - a0*a1*b1*c0 + a1**2*b0*c0)
(a0*c0 + a1*c1)/(a0*b1*b1*c0 - a0*b0*b1*c1 - a1*b0*b1*c0 + a1*b0*b0*c1)
(a0*b0 + a1*b1)/(a0*b0*c1*c1 - a0*b1*c0*c1 - a1*b0*c0*c1 + a1*b1*c0*c0)

as a solution (where (a0, a1), (b0, b1), (c0, c1) are the edge coordinates). Clearly the numerator is the dot-product of the two "other" edges; the denominator of the first component equals (a0*b1 - a1*b0) * (a0*c1 - a1*c0). Together, this can be written as $$ x_1 = \frac{\langle e_2, e_3\rangle}{\langle e_1\times e_2, e_1\times e_3\rangle} $$ for the solution in the first component. (The other components likewise.)

The result holds true if the triangle is rotated in space since $$ \langle R a, R b\rangle = \langle a, b\rangle \text{ and}\\ (R a)\times (R b) = R(a\times b) $$ for any two vectors $a, b$ and any rotation matrix $R$.

$\endgroup$

You must log in to answer this question.

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