1

Abstract: I've got a matrix described as a linear combination of matrices, with coefficients computed using scalar products and the likes. I'd like to obtain a simple formula for this matrix, by clever application of the distributive law and other simplification options.

Background: I've recently obtained a formula to compute the matrices of the pair of conics defined by a pole-polar-pair, an incident point and two tangent lines. I used computer algebra to eliminate common factors and now I am looking for a nice, elegant, compact representation of the penultimate matrices in that computation. One of them in particular is tricky, though.

Audience: So I'm asking this as a question for those of you who like to puzzle a bit, or perhaps also for those of you who know of a systematic approach to simplify things like these. Kind of related to Simplifying polynomials but far more concrete.

Data: My computer algebra system gave me the following description of the space of solutions, in a notation I'll describe below:

goal                                       2
(a,a) <a,A> <a,A> <c,B> <c,B> <d,B> <d,B>  2
(a,a) <a,A> <a,B> <c,A> <c,B> <d,B> <d,B> -4  1
(a,a) <a,A> <a,B> <c,B> <c,B> <d,A> <d,B> -4 -1
(a,a) <a,B> <a,B> <c,A> <c,A> <d,B> <d,B>  1     1
(a,a) <a,B> <a,B> <c,A> <c,B> <d,A> <d,B>  6        1
(a,a) <a,B> <a,B> <c,B> <c,B> <d,A> <d,A>  1    -1 -1
(a,c) <a,A> <a,A> <a,B> <c,B> <d,B> <d,B>    -1
(a,c) <a,A> <a,B> <a,B> <c,A> <d,B> <d,B>              1
(a,c) <a,A> <a,B> <a,B> <c,B> <d,A> <d,B>  2  1 -2 -1 -1
(a,c) <a,B> <a,B> <a,B> <c,A> <d,A> <d,B> -2              1
(a,c) <a,B> <a,B> <a,B> <c,B> <d,A> <d,A> -2     2  1    -1
(a,d) <a,A> <a,A> <a,B> <c,B> <c,B> <d,B>     1
(a,d) <a,A> <a,B> <a,B> <c,A> <c,B> <d,B>                    1
(a,d) <a,A> <a,B> <a,B> <c,B> <c,B> <d,A>  2 -1  2  1       -1
(a,d) <a,B> <a,B> <a,B> <c,A> <c,A> <d,B>                       1
(a,d) <a,B> <a,B> <a,B> <c,A> <c,B> <d,A> -4    -2 -1          -1
(a,AB) [acd] <a,A> <a,B> <c,B> <d,B>         -1
(a,AB) [acd] <a,B> <a,B> <c,A> <d,B>                               1
(a,AB) [acd] <a,B> <a,B> <c,B> <d,A>            -2 -1             -1
(c,c) <a,A> <a,A> <a,B> <a,B> <d,B> <d,B>       -1    -1
(c,c) <a,A> <a,B> <a,B> <a,B> <d,A> <d,B>        2     1 -1
(c,c) <a,B> <a,B> <a,B> <a,B> <d,A> <d,A>  1    -1        1
(c,d) <a,A> <a,A> <a,B> <a,B> <c,B> <d,B>    -1  2     1    -1
(c,d) <a,A> <a,B> <a,B> <a,B> <c,A> <d,B>       -2    -1       -1
(c,d) <a,A> <a,B> <a,B> <a,B> <c,B> <d,A>     1 -2        1  1
(c,d) <a,B> <a,B> <a,B> <a,B> <c,A> <d,A>        2       -1     1
(c,AB) [acd] <a,A> <a,B> <a,B> <d,B>            -2    -1          -1
(c,AB) [acd] <a,B> <a,B> <a,B> <d,A>             2       -1        1
(d,d) <a,A> <a,A> <a,B> <a,B> <c,B> <c,B> -2  1 -1           1
(d,d) <a,A> <a,B> <a,B> <a,B> <c,A> <c,B>  4 -1  2          -1  1
(d,d) <a,B> <a,B> <a,B> <a,B> <c,A> <c,A> -1    -1             -1
(d,AB) [acd] <a,A> <a,B> <a,B> <c,B>       2 -1  2          -1     1
(d,AB) [acd] <a,B> <a,B> <a,B> <c,A>      -2    -2             -1 -1
(AB,AB) [acd] [acd] <a,B> <a,B>                 -1                -1

Row labels: The labels $A$ and $B$ denote points, the labels $a, c, d$ lines, each given as three-element homogeneous coordinate vectors. The geometric meaning of these vectors is irrelevant for the question at hand, though. A term like $\langle a,B\rangle$ describes a scalar product. The term $[abc]$ represents the determinant of these three vectors.

The first term of each row is a rank one matrix obtained by multiplying a column vector with a row vector. So $(c,d)$ is $c\cdot d^T$ if your vectors are column vectors by default. $(d,AB)$ represents $d\cdot(A\times B)^T$, using the cross product in there. The matrices represent quadratic forms. They will be symmetrized by adding their transpose in the end, so the order of terms does not matter. $(a,c)$ and $(c,a)$ are the same thing, so only one of them appears in the list but either of them (or even a combination of both of them) might be used in a shorter solution.

Columns: Each column represents a linear dependency between the terms of the corresponding rows. The first column has a coefficient of $2$ in the row marked goal. So if one multiplies each row label monomial (except for goal itself) by the coefficient given in that first column, one obtains $-2$ times the desired result (since adding $2$ times the desired result will result in the zero matrix). The other columns are just complicated representations of the zero matrix. So one could add a multiple of any of the other columns to the first column in order to obtain an equivalent linear combination of the given monomials.

Simplification: So how can things be simplified? Adding one of the later columns as described above may be one aspect to this, but the strongest tool is the distributive law: Rows which differ in some of the terms can be combined by using a suitably weighted sum in one of the scalar products, or in one of the vectors that constitute the matrix term. It is far from obvious to me how one could do this systematically, though, and there are far too many possible approaches to try all of them by hand without a good intuition about what would make things easier.

Result so far: Currently I'm using the following representation of the linear combination from the first column. Actually my representation has the opposite sign of what I wrote above, since I divided that column by $2$ not $-2$. But the overall sign is irrelevant in my application.

\begin{align*} \Bigl(a{}\cdot{}(\qquad&\langle a,A\rangle^2\cdot\langle c,B\rangle^2\cdot\langle d,B\rangle^2 \\ -2\cdot{}&\langle a,A\rangle\cdot\langle a,B\rangle\cdot\langle c,A\rangle\cdot\langle c,B\rangle\cdot\langle d,B\rangle^2 \\ -2\cdot{}&\langle a,A\rangle\cdot\langle a,B\rangle\cdot\langle c,B\rangle^2\cdot\langle d,A\rangle\cdot\langle d,B\rangle \\ +\tfrac12\cdot{}&\langle a,B\rangle^2\cdot\langle c,A\rangle^2\cdot\langle d,B\rangle^2 \\ +3\cdot{}&\langle a,B\rangle^2\cdot\langle c,A\rangle\cdot\langle c,B\rangle\cdot\langle d,A\rangle\cdot\langle d,B\rangle \\ +\tfrac12\cdot{}&\langle a,B\rangle^2\cdot\langle c,B\rangle^2\cdot\langle d,A\rangle^2) \\ +c{}\cdot{}(\qquad&\langle a,A\rangle\cdot\langle c,B\rangle\cdot\langle d,B\rangle \\ -&\langle a,B\rangle\cdot\langle c,A\rangle\cdot\langle d,B\rangle \\ -&\langle a,B\rangle\cdot\langle c,B\rangle\cdot\langle d,A\rangle \\ &)\cdot\langle a,B\rangle^2\cdot\langle d,A\rangle \\ +d{}\cdot{}(\qquad&\langle a,A\rangle\cdot\langle c,B\rangle \\ -2\cdot{}&\langle a,B\rangle\cdot\langle c,A\rangle \\ &){}\cdot{}\langle a,B\rangle^2\cdot\langle c,B\rangle\cdot\langle d,A\rangle \\ \Bigr){}\cdot{} a^T + & \tfrac12\cdot(c\cdot c^T)\cdot\langle a,B\rangle^4\cdot\langle d,A\rangle^2 \end{align*}

This can certainly be simplified in some places, but while it is fairly easy to spot some minor improvements, I believe that it should be possible to find some major ones as well although I don't know how.

Second matrix: The actual problem comes with a second matrix, which is far easier since it has far lower degrees. This might serve as a practice example, or as additional input if someone has a systematic approach. Or just ignore this, if you feel answering for one matrix is enough. You already know the notation, so here is the data:

goal                     1
(a,a) <a,A> <c,B> <d,B> -1
(a,a) <a,B> <c,A> <d,B>  1  1
(a,a) <a,B> <c,B> <d,A>  1 -1
(a,c) <a,A> <a,B> <d,B>    -1
(a,c) <a,B> <a,B> <d,A> -1  1
(a,d) <a,A> <a,B> <c,B>     1
(a,d) <a,B> <a,B> <c,A> -1 -1
(a,AB) [acd] <a,B>         -1
(c,d) <a,A> <a,B> <a,B>  1

Justification: So why do I think there should be a simpler representation? Well, before this I had the simpler problem of a conic defined by two polar pairs and one tangent line. At first that looked like this:

goal                           1                     
(a,a) <b,A> <b,A> <c,B> <c,B>     1                  
(a,a) <b,A> <b,B> <c,A> <c,B>        1               
(a,a) <b,B> <b,B> <c,A> <c,A> -1 -1 -1               
(a,b) <a,A> <b,A> <c,B> <c,B>           1            
(a,b) <a,A> <b,B> <c,A> <c,B> -2 -2 -1 -1            
(a,b) <a,B> <b,A> <c,A> <c,B>              1         
(a,b) <a,B> <b,B> <c,A> <c,A>  4  2  1    -1         
(a,c) <a,A> <b,A> <b,B> <c,B>                 1      
(a,c) <a,A> <b,B> <b,B> <c,A>  2  2  1       -1      
(a,c) <a,B> <b,A> <b,A> <c,B>                    1   
(a,c) <a,B> <b,A> <b,B> <c,A> -2 -2 -1          -1   
(a,AB) [abc] <b,A> <c,B>                            1
(a,AB) [abc] <b,B> <c,A>      -2 -2 -1             -1
(b,b) <a,A> <a,A> <c,B> <c,B> -1 -1    -1            
(b,b) <a,A> <a,B> <c,A> <c,B>  4  2     1 -1         
(b,b) <a,B> <a,B> <c,A> <c,A> -4 -1        1         
(b,c) <a,A> <a,A> <b,B> <c,B>  2  2     1    -1      
(b,c) <a,A> <a,B> <b,A> <c,B> -2 -2    -1       -1   
(b,c) <a,A> <a,B> <b,B> <c,A> -4 -2        1  1      
(b,c) <a,B> <a,B> <b,A> <c,A>  4  2       -1     1   
(b,AB) [abc] <a,A> <c,B>      -2 -2    -1          -1
(b,AB) [abc] <a,B> <c,A>       4  2       -1        1
(c,c) <a,A> <a,A> <b,B> <b,B> -1 -1           1      
(c,c) <a,A> <a,B> <b,A> <b,B>  1  2          -1  1   
(c,c) <a,B> <a,B> <b,A> <b,A>    -1             -1   
(c,AB) [abc] <a,A> <b,B>       2  2          -1     1
(c,AB) [abc] <a,B> <b,A>         -2             -1 -1
(AB,AB) [abc] [abc]           -1 -1                -1

But by now I have this simplified to

$$\bigl((\langle a,A\rangle\cdot\langle c,B\rangle-\langle a,B\rangle\cdot\langle c,A\rangle)\cdot b + (\langle b,B\rangle\cdot\langle a,A\rangle-\langle b,A\rangle\cdot\langle c,B\rangle)\cdot a -[abc]\cdot(A\times B)\bigr)\\\cdot(\langle b,A\rangle\cdot\langle a,B\rangle\cdot c)^T + v\cdot v^T\qquad\text{with } v=\langle b,A\rangle\cdot\langle c,B\rangle\cdot a-\langle a,B\rangle\cdot\langle c,A\rangle\cdot b$$

So just because the original matrix of linear dependencies is pretty dense, or because it contains entries with an absolute value in excess of two, does not mean that a two-line solution isn't possible given the right approach. It was nice how this choice of $v$ in particular took care of a number of entries at once.

MvG
  • 42,596

0 Answers0