John Halleck's Least Squares Examples:


Example derivations

This page requires a very high tolerance for mathematics.

This page is the actual derivations used to compute the examples used in the Least Squares page.

Some examples may still be being worked on.

Example One

*** Notation warning *** This example uses A' to mean A inverse.

Least squares example one: Multiplying through by the inverse

Problem:
[ W0+W1  -W1 ] [ P1 ]  = [ W0  -W1 ] [ SO ]
[   -W1  +W1 ] [ P2 ]    [  0  +W1 ] [ S1 ]

Setup for inverse:
[ W0+W1  -W1 | 1 0 ]
[   -W1  +W1 | 0 1 ]

Row 2 added to row 1
[  W0   0 | 1 1 ]
[ -W1 +W1 | 0 1 ]

Row 1 scaled by W0'
[   1   0 | W0' W0' ]
[ -W1 +W1 |  0   1  ]

Row 1 premultiplied by  W1 added to row 2
[  1   0 | W0'      W0'    ]
[  0 +W1 | W1*W0' 1+W1*W0' ]

Row 2 scaled by premultiplication by W1'
[  1   0 | W0'      W0'    ]
[  0   1 | W0'    W1'+W0'  ]

Row to cleaned up
[  1   0 | W0'  W0'     ]
[  0   1 | W0'  W0'+W1' ]


And now premultiplying both sides by the inverse we get.
[ P1 ] = [ W0'  W0'     ] [ W0  -W1 ] [ SO ]
[ P2 ] = [ W0'  W0'+W1' ] [  0  +W1 ] [ S1 ]

=

points              (Shot view)          Shots
[ P1 ] = [ W0'  W0'     ] [ W0  -W1 ]    [ SO ]
[ P2 ]   [ W0'  W0'+W1' ] [  0  +W1 ]    [ S1 ]

=

[ P1 ] = [ W0'W0         -W0'W1+W0'W1 ] [ S0 ]
[ P2 ]   [ W0'W0   -W0'W1+(W0'+W1')W1 ] [ S1 ]

 W0'W0 = 1
-W0'W1+W0'W1 is 0
-W0'W1+(W0'+W1')W1 is -W0'W1 + W0'W1 + W1'W1
               which is W1'W1
               which is  1

=

           Shot view        Point view
[ P1 ] = [ 1 0 ] [ S0 ]  = [ S0    ]
[ P2 ]   [ 1 1 ] [ S1 ]    [ S0+S1 ]

Example 2

*** Notation warning *** This example uses A' to mean A inverse.

Least squares example two, multiplying through by the inverse.

Problem:
[ W0+W1+W2  -W1-W2 ] [ P1 ] = [ W0  -W1  -W2 ] [ SO ]
[   -W1-W2   W1+W2 ] [ P2 ]   [  0   W1   W2 ] [ S1 ]
                                               [ S2 ]

Setup to find inverse:
[ W0+W1+W2  -W1-W2 | 1 0 ]
[   -W1-W2   W1+W2 | 0 1 ]

Row 2 added to row 1
[   W0         0   | 1 1 ]
[ -W1-W2     W1+W2 | 0 1 ]

Row 1 scaled by W0'
[    1       0   | W0'  W0' ]
[ -W1-W2   W1+W2 |  0    1  ]

Row 1 premultiplied by  (W1+W2)' added to row 2
[  1     0   | W0'            W0' ]
[  0   W1+W2 | W0'  1+(W1+W2)'W0' ]

Scale row 2 premultiplying by (W1+W2)'
[  1   0   | W0'            W0' ]
[  0   1   | W0'   (W1+W2)'+W0' ]

Cleaning up row 2 slightly.
[  1   0   | W0'   W0'          ]
[  0   1   | W0'   W0'+(W1+W2)' ]


So multiplying both sides by the inverse we have =
[ P1 ] = [ W0'  W0'           ]  [ W0  -W1  -W2 ] [ SO ]
[ P2 ]   [ W0'  W0'+ (W1+W2)' ]  [  0   W1   W2 ] [ S1 ]
                                                  [ S3 ]

Everything up to the shots on the right hand side give the
view in terms of shots...
[ P1 ] = [ W0'W0  -W0'W1+W0'W1             -W0'W2+W0'W2            ] [ SO ]
[ P2 ]   [ W0'W0  -W0'W1+(W0'+(W1+W2)')W1  -W0'W2+(W0'+(W1+W2)')W2 ] [ S1 ]
                                                                     [ S3 ]
Grim, No?
W0'W0 is 1
-W0'W1+W0'W1 is 0
-W0'W2+W0'W2 is 0
-W0'W1+(W0'+(W1+W2)'+W0')W1 is -W0'W1 +W0'W1 + (W1+W2)'W1
                    Which is (W1+W2)'W1
-W0'W2+(W0'+(W1+W2)')W2 is -W0'W2 + W0W2 + (W1+W2)'W2
                    Which is (W1+W2)'W2

Giving the view as shots:

[ P1 ] = [ 1         0           0    ] [ SO ]
[ P2 ]   [ 1   (W1+W2)'W1  (W1+W2)'W2 ] [ S1 ]
                                        [ S3 ]
And the view as points:
[ P1 ] = [ S0                               ]
[ P2 ]   [ S0 + (W1+W2)'W1S1 + (W1+W2)'W2S2 ]

Example Three

*** Notation warning *** This example users A' to mean A inverse.

Least squares example three, multiplying both sides by the inverse.

Problem:
[ WO+W1  -W1             0       0 ] [ P1 ]   [ W0  -W1    0    0    0 ] [ SO ]
[   -W1  +W1+W2+W4   -W2 -W4     0 ] [ P2 ] = [  0   W1  -W2    0   W4 ] [ S1 ]
[     0     -W2-W4  +W2+W3+W4  -W3 ] [ P3 ]   [  0    0   W2  -W3  -W4 ] [ S2 ]
[     0     0          -W3     +W3 ] [ P4 ]   [  0    0    0   W3    0 ] [ S3 ]
                                                                         [ S4 ]

Setup to find the inverse:
[ WO+W1  -W1             0       0 | 1 0 0 0 ]
[   -W1  +W1+W2+W4   -W2 -W4     0 | 0 1 0 0 ]
[     0     -W2-W4  +W2+W3+W4  -W3 | 0 0 1 0 ]
[     0     0          -W3     +W3 | 0 0 0 1 ]

Row 4 added to row 3
[ WO+W1  -W1             0       0 | 1 0 0 0 ]
[   -W1  +W1+W2+W4   -W2 -W4     0 | 0 1 0 0 ]
[     0     -W2-W4   +W2 +W4     0 | 0 0 1 1 ]
[     0     0          -W3     +W3 | 0 0 0 1 ]

Row 3 added to row 2
[ WO+W1  -W1             0       0 | 1 0 0 0 ]
[   -W1  +W1             0       0 | 0 1 1 1 ]
[     0     -W2-W4   +W2 +W4     0 | 0 0 1 1 ]
[     0     0          -W3     +W3 | 0 0 0 1 ]

Row 2 added to row 1
[ WO      0            0        0 | 1 1 1 1 ]
[  -W1   +W1           0        0 | 0 1 1 1 ]
[    0     -W2-W4   +W2 +W4     0 | 0 0 1 1 ]
[    0     0          -W3     +W3 | 0 0 0 1 ]

Row 1 premultiplied by W0'
[   1     0          0        0 | W0' W0' W0' W0' ]
[ -W1  +W1           0        0 | 0    1   1   1  ]
[   0    -W2-W4   +W2 +W4     0 | 0    0   1   1  ]
[   0    0          -W3     +W3 | 0    0   0   1  ]

Row 1 premultiplied by  W1 added to row 2
[   1     0          0        0 | W0'    W0'      W0'      W0'     ]
[   0  +W1           0        0 | W1W0'  W1W0'+1  W1W0'+1  W1W0'+1 ]
[   0    -W2-W4   +W2 +W4     0 | 0       0        1        1      ]
[   0    0          -W3     +W3 | 0       0        0        1      ]

Row 2 premultiplied by  W1'
[  1   0           0        0 | W0' W0'     W0'      W0'     ]
[  0   1           0        0 | W0' W0'+W1' W0'+W1'  W0'+W1' ]
[  0   -W2-W4   +W2 +W4     0 | 0    0       1        1      ]
[  0   0          -W3     +W3 | 0    0       0        1      ]

Row 2 premultiplied by (W2+W4) added to row 3
[ 1  0    0     0 | W0'          W0'              W0'                W0'               ]
[ 0  1    0     0 | W0'          W0'+W1'          W0'+W1'            W0'+W1'           ]
[ 0  0  +W2+W4  0 | (W2+W4)W0'  (W2+W4)(W0'+W1') (W2+W4)(W0'+W1')+1 (W2+W4)(W0'+W1')+1 ]
[ 0  0   -W3  +W3 | 0              0                0                 1                ]

Row 3 premultiplied by (W2+W4)'
[ 1  0   0     0 | W0'   W0'       W0'               W0'              ]
[ 0  1   0     0 | W0'   W0'+W1'   W0'+W1'           W0'+W1'          ]
[ 0  0   1     0 | W0'   W0'+W1'   W0'+W1'+(W2+W4)'  W0'+W1'+(W2+W4)' ]
[ 0  0  -W3  +W3 | 0      0         0                 1               ]

Row 3 premultiplied by W3 added to row 4
[ 1  0  0   0 | W0'     W0'          W0'                   W0'                   ]
[ 0  1  0   0 | W0'     W0'+W1'      W0'+W1'               W0'+W1'               ]
[ 0  0  1   0 | W0'     W0'+W1'      W0'+W1'+(W2+W4)'      W0'+W1'+(W2+W4)'      ]
[ 0  0  0  W3 | W3W0'  W3(W0'+W1')  W3(W0'+W1'+(W2+W4)')  W3(W0'+W1'+(W2+W4)')+1 ]

premultiply row 4 by W3'
[ 1  0  0  0 | W0'  W0'      W0'               W0'                  ]
[ 0  1  0  0 | W0'  W0'+W1'  W0'+W1'           W0'+W1'              ]
[ 0  0  1  0 | W0'  W0'+W1'  W0'+W1'+(W2+W4)'  W0'+W1'+(W2+W4)'     ]
[ 0  0  0  1 | W0'  W0'+W1'  W0'+W1'+(W2+W4)'  W0'+W1'+(W2+W4)'+W3' ]


Ok, we have the inverse, multiplying both sides through by it gives:
[ P1 ]   [ W0'  W0'      W0'               W0'                  ] [ W0  -W1    0    0    0 ] [ SO ]
[ P2 ] = [ W0'  W0'+W1'  W0'+W1'           W0'+W1'              ] [  0   W1  -W2    0   W4 ] [ S1 ]
[ P3 ]   [ W0'  W0'+W1'  W0'+W1'+(W2+W4)'  W0'+W1'+(W2+W4)'     ] [  0    0   W2  -W3  -W4 ] [ S2 ]
[ P4 ]   [ W0'  W0'+W1'  W0'+W1'+(W2+W4)'  W0'+W1'+(W2+W4)'+W3' ] [  0    0    0   W3    0 ] [ S3 ]
                                                                                             [ S4 ]
The first two matrices on the right hand side multiply out to:
[ 1 0    0        0      0       ]
[ 1 1    0        0      0       ]
[ 1 1 (W2+W4)'W2  0  -(W2+W4)'W4 ]
[ 1 1 (W2+W4)'W2  1  -(W2+W4)'W4 ]

So we have
         (Shots as the point of view)                     (Points as the point of view)
[ P1 ]   [ 1 0    0        0      0        ] [ SO ]   [ S0                                         ]
[ P2 ] = [ 1 1    0        0      0        ] [ S1 ] = [ S0 + S1                                    ]
[ P3 ]   [ 1 1 (W2+W4)'W2  0  -(W2+W4)'W4  ] [ S2 ]   [ S0 + S1 + (W2+W4)'W2S2      - (W2+W4)'W4S4 ]
[ P4 ]   [ 1 1 (W2+W4)'W2  1  -(W2+W4)'W4  ] [ S3 ]   [ S0 + S1 + (W2+W4)'W2S2 + S3 - (W2+W4)'W4S4 ]

Example Four

[*** Under construction ***]

*** Notation Warning *** This example uses A' to mean inverse(A)

Least squares example four, multiplying both sides by the inverse.

Problem:
[ W0+W1+W3   -W1         -W3 ] [ P1 ] = [ W0  -W1    0   W3 ] [ S0 ]
[   -W1       W1+W2   -W2    ] [ P2 ]   [  0   W1  -W2    0 ] [ S1 ]
[      -W3      -W2   +W2+W3 ] [ P3 ]   [  0    0   W2  -W3 ] [ S2 ]
                                                              [ S3 ]

Setting up for the inverse:
[ W0+W1+W3   -W1         -W3 | 1 0 0 ]
[   -W1       W1+W2   -W2    | 0 1 0 ]
[      -W3      -W2   +W2+W3 | 0 0 1 ]

Add row 3 to row 1
[ W0+W1      -W1-W2   +W2    | 1 0 1 ]
[   -W1       W1+W2   -W2    | 0 1 0 ]
[      -W3      -W2   +W2+W3 | 0 0 1 ]

Add row 2 to row 1
[ W0            0       0    | 1 1 1 ]
[   -W1       W1+W2   -W2    | 0 1 0 ]
[      -W3      -W2   +W2+W3 | 0 0 1 ]

-------- Alternate derivation 1

Row 1 premultiplied by W1W0' added to row 2.
[ W0            0       0    | 1     1       1     ]
[ 0           W1+W2   -W2    | W1W0' 1+W1W0' W1W0' ]
[      -W3      -W2   +W2+W3 | 0     0       1     ]

Row 1 premultiplied by W1W0' added to row 2.
[ W0            0       0    | 1     1       1     ]
[ 0           W1+W2   -W2    | W1W0' 1+W1W0' W1W0' ]
[      -W3      -W2   +W2+W3 | 0     0       1     ]

Row 1 premultiplied by W3W0' added to row 3
[ W0     0       0    | 1     1       1       ]
[  0   W1+W2   -W2    | W1W0' 1+W1W0' W1W0'   ]
[  0     -W2   +W2+W3 | W3W0' W3W0'   1+W3W0' ]

Row 3 added to row 2
[ W0     0         0  | 1            1                   1       ]
[  0    W1         W3 | W3W0'+W1W0'  W3W0'+1+W1W0'  W3W0'+W1W0'  ]
[  0     -W2   +W2+W3 | W3W0'        W3W0'               1+W3W0' ]

Row 2 premultiplied by W2W1' added to row 3
[ W0   0    0            |                    1                               1                         1  ]
[  0  W1   W3            |            W3W0'+W1W0'              W3W0'+    1+W1W0'               W3W0'+W1W0' ]
[  0   0  +W2+W3+W2W1'W3 | W3W0'+W2W1'W3W0'+W2W0'   W3W0'+W2W1'W3W0'+W2W1'+W2W0'  1+W3W0'+W2W1'W3W0'+W2W0' ]

+W2+W3+W2W1'W3 = ( W2W3'+ 1  + W2W1') W3
               = W2 (W3'+ W2'+   W1') W3
               = W2(W1'+W2'+W3')W3

W3W0'+W2W1'W3W0'+W2W0' = (W3+W2W1'W3+W2)W0'
                       = (W2+W2W1'W3+W3)W0'
                       = W2(1+ W1'W3+W2'W3)W0'
                       = W2(W3'+W1'+W2')W3W0'
                       = W2(W1'+W2'+W3')W3W0'

W3W0'+W2W1'W3W0'+W2W1'+W2W0' = (W3+W2W1'W3+W2W1'W0+W2)W0'
                             = (W2+W2W1'W3+W2W1'W0+W3)W0'
                             = W2(1+W1'W3+W2W1'W0+W2'W3)W0'
                             = W1(W3'+W1'+W2W1'W0W3'+W2')W3W0'
or
W3W0'+W2W1'W3W0'+W2W1'+W2W0' = (W3+W2W1'W3+W2)W0'+W2W1'
                             = (W2+W2W1'W3+W3)W0'+W2W1'
                             = W2(W2'+W1'+W3')W3W0'+W2W1'
                             = W2(W1'+W2'+W3')W3W0'+W2W1'

1+W3W0'+W2W1'W3W0'+W2W0' = 1+(W3+W2W1'W3+W2)W0'
                         = 1+(W2+W2W1'W3+W3)W0'
                         = 1+W2(1+W1'W3+W2'W3)W0'
                         = 1+W2(W3'+W1'+W2')W3W0'
                         = 1+W2(W1'+W2'+W3')W3W0'

[ W0   0          0         |                   1                           1                       1  ]
[  0  W1         W3         |          W3W0'+W1W0'               W3W0'+1+W1W0'             W3W0'+W1W0' ]
[  0   0  W2(W1'+W2'+W3')W3 | W2(W1'+W2'+W3')W3W0'  W2(W1'+W2'+W3')W3W0'+W2W1'  W2(W1'+W2'+W3')W3W0'+1 ]

Scale row 3 premultiplying by (W2(W1'+W2'+W3')W3)' = W3'(W1'+W2'+W3')'W2'
[ W0   0   0 |       1                      1                       1              ]
[  0  W1  W3 |  W3W0'+W1W0'           W3W0'+1+W1W0'             W3W0'+W1W0'        ]
[  0   0   1 |      W0'         W0'+W3'(W1'+W2'+W3')'W1'  W0'+W3'(W1'+W2'+W3')'W2' ]

Row 3 , premultiplied by -W3 added to row 2
[ W0   0   0 |                 1                                      1                                    1  ]
[  0  W1   0 |  W3W0'+W1W0'-W3W0'  W3W0'+1+W1W0'-W3W0'-(W1'+W2'+W3')'W1'  W3W0'+W1W0'-W3W0'-(W1'+W2'+W3')'W2' ]
[  0   0   1 |                W0'               W0'+W3'(W1'+W2'+W3')'W1'             W0'+W3'(W1'+W2'+W3')'W2' ]
=
[ W0   0   0 |     1                          1                         1  ]
[  0  W1   0 |  W1W0'  1+W1W0'-(W1'+W2'+W3')'W1'   W1W0'-(W1'+W2'+W3')'W2' ]
[  0   0   1 |    W0'   W0'+W3'(W1'+W2'+W3')'W1'  W0'+W3'(W1'+W2'+W3')'W2' ]

Scaling row 2 by premultiplying by W1'
[ W0   0   0 |    1                              1                         1  ]
[  0   1   0 |   W0'   W0'+W1'-W1'(W1'+W2'+W3')'W1'  W0'-W1'(W1'+W2'+W3')'W2' ]
[  0   0   1 |   W0'       W0'+W3'(W1'+W2'+W3')'W1'  W0'+W3'(W1'+W2'+W3')'W2' ]

Scaling row 1 by premultiplying by W0'
[  1   0   0 |   W0'                            W0'                       W0' ]
[  0   1   0 |   W0'   W0'+W1'-W1'(W1'+W2'+W3')'W1'  W0'-W1'(W1'+W2'+W3')'W2' ]
[  0   0   1 |   W0'       W0'+W3'(W1'+W2'+W3')'W1'  W0'+W3'(W1'+W2'+W3')'W2' ]

W0'+W1'-W1'(W1'+W2'+W3')'W1' = W0'+(W2'+W3')(W1'+W2'+W3')W1'
[  1   0   0 |   W0'                             W0'                       W0' ]
[  0   1   0 |   W0'   W0'+(W2'+W3')(W1'+W2'+W3')W1'  W0'-W1'(W1'+W2'+W3')'W2' ]
[  0   0   1 |   W0'        W0'+W3'(W1'+W2'+W3')'W1'  W0'+W3'(W1'+W2'+W3')'W2' ]

*** Note to myself
c(a+b+c)'a - a(a+b+c)'c
ca'(a'+(b+c)')'a - a(a'+(b+c)')'a'c
c(a'(a'+(b+c)')'a - c'a(a'+(b+c)')'a'c)
c(a'(a'+(b+c)')'ac' - c'a(a'+(b+c)')'a')c


abc-cba = a'b'c'-cba = (cba)'-cba = I - cbacba
*** End note.

-------- End alternate derivation 1

--------- Alternate derivation 2

Setting up for the inverse:
[ W0+W1+W3   -W1         -W3 | 1 0 0 ]
[   -W1       W1+W2   -W2    | 0 1 0 ]
[      -W3      -W2   +W2+W3 | 0 0 1 ]

Add row 3 to row 1
[ W0+W1      -W1-W2   +W2    | 1 0 1 ]
[   -W1       W1+W2   -W2    | 0 1 0 ]
[      -W3      -W2   +W2+W3 | 0 0 1 ]

Add row 2 to row 1
[ W0            0       0    | 1 1 1 ]
[   -W1       W1+W2   -W2    | 0 1 0 ]
[      -W3      -W2   +W2+W3 | 0 0 1 ]

Scale row 1 by premultiplying W0'
[  1            0       0    | W0'  W0'  W0' ]
[   -W1       W1+W2   -W2    |  0    1    0  ]
[      -W3      -W2   +W2+W3 |  0    0    1  ]

Row 1 premultiplied by W1 added to row 2
[  1       0       0    |   W0'    W0'      W0' ]
[  0     W1+W2   -W2    | W1W0'  W1W0'+1  W1W0' ]
[  -W3     -W2   +W2+W3 |    0      0        1  ]

Row 1 premultiplied by W3 added to row 3
[  1    0       0    |   W0'    W0'      W0'   ]
[  0  W1+W2   -W2    | W1W0'  W1W0'+1  W1W0'   ]
[  0    -W2   +W2+W3 | W3W0'  W3W0'    W3W0'+1 ]

Row 3 added to row 2
[  1    0          0 |   W0'          W0'             W0'         ]
[  0   W1         W3 | W1W0'+W3W0'  W1W0'+W3W0'+1   W1W0'+W3W0'+1 ]
[  0    -W2   +W2+W3 |       W3W0'         W3W0'          W3W0'+1 ]

**** Derivation 3
Row 2 premultiplied by W1'
[  1    0          0 |   W0'          W0'               W0'              ]
[  0    1      W1'W3 | W0'+W1'W3W0'  W0'+W1'W3W0'+W1'   W0'+W1'W3W0'+W1' ]
[  0    -W2   +W2+W3 |       W3W0'         W3W0'               W3W0'+1   ]

Row 1 premultiplied by W2 added to row three
[  1    0          0       |   W0'                     W0'                             W0'                              ]
[  0    1      W1'W3       | W0'+W1'W3W0'              W0'+W1'W3W0'+W1'                W0'+W1'W3W0'+W1'                 ]
[  0    0   W2W1'W3++W2+W3 | W2W0'+W2W1'W3W0'+W3W0'   W2W0'+W2W1'W3W0'+W2W1'+W3W0'     W2W0'+W2W1'W3W0'+W2W1'+W3W0'+1   ]
=
[  1    0          0      |   W0'                     W0'                             W0'                         ]
[  0    1      W1'W3      | W0'+W1'W3W0'              W0'+W1'W3W0'+W1'                W0'+W1'W3W0'+W1'            ]
[  0    0   W1'W3+1+W2'W3 | W0'+W1'W3W0'+W2'W3W0'   W0'+W1'W3W0'+W1'+W2'W3W0'     W0'+W1'W3W0'+W1'+W2'W3W0'+W2'   ]
=
****

Row 2 scaled by premultiplying by W1'
[  1   0          0 |  W0'           W0'                W0'              ]
[  0   1      W1'W3 |  W0'+W1'W3W0'  W0'+W1'W3W0'+W1'   W0'+W1'W3W0'+W1' ]
[  0   -W2   +W2+W3 |      W3W0'         W3W0'          W3W0'+1          ]

Row 2 premultiplied by W2 added to row 3
[  1   0                0 |   W0'                     W0'                           W0'                          ]
[  0   1            W1'W3 |   W0'+  W1'W3W0'          W0'  +W1'W3W0'  +W1'          W0'  +W1'W3W0'  +W1'         ]
[  0   0   +W2+W3-W2W1'W3 | W2W0'+W2W1'W3W0'+W3W0'  W2W0'+W2W1'W3W0'+W2W1'+W3W0'  W2W0'+W2W1'W3W0'+W2W1'+W3W0'+1 ]

+W2+W3+W2W1'W3 = W2(W1'+W2'+W3')W3

-W2W0'-W2W1'W3W0'+W3W0'        = (W2+W2W1'W3+W3)W0'
                               = W2(W1'+W2'+W3')W3W0'

W2W0'+W2W1'W3W0'+W2W1'+W3W0'   = (W2+W2W1'W3+W3)W0'+W2W1'
                               = W2(W1'+W2'+W3')W3W0+W2W1'

W2W0'+W2W1'W3W0'+W2W1'+W3W0'+1 = W2(W1'+W2'+W3')W3W0'+W2W1'+1

[  1  0                  0 | W0'                 W0'                        W0'                          ]
[  0  1              W1'W3 | W0'+W1'W3W0'        W0'+W1'W3W0'+W1'           W0'  +W1'W3W0'  +W1'         ]
[  0  0  W2(W1'+W2'+W3')W3 | W2(W1'+W2'+W3')W3   W2(W1'+W2'+W3')W3W0+W2W1'  W2(W1'+W2'+W3')W3W0'+W2W1'+1 ]

Scaling row 3 by premultiplying by (W2(W1'+W2'+W3')W3)' = W3'(W1'+W2'+W3')'W2'
[  1  0      0 | W0'            W0'                            W0'                                                ]
[  0  1  W1'W3 | W0'+W1'W3W0'   W0'+W1'W3W0'+W1'               W0'+W1'W3W0'+W1'                                   ]
[  0  0      1 | W0'            W0'+W3'(W1'+W2'+W3')'W2'W2W1'  W0'+W3'(W1'+W2'+W3')'W2'W2W1'+W3'(W1'+W2'+W3')'W2' ]

W0'+W3'(W1'+W2'+W3')'W2'W2W1' = W0'+W3'(W1'+W2'+W3')'W1'

W0'+W3'(W1'+W2'+W3')'W2'W2W1'+W3'(W1'+W2'+W3')'W2'
      = W0'+W3'(W1'+W2'+W3')'W1'+W3'(W1'+W2'+W3')'W2'
      = W0'+W3'(W1'+W2'+W3')'(W1'+W2')

[  1  0      0 | W0'            W0'                        W0'                            ]
[  0  1  W1'W3 | W0'+W1'W3W0'   W0'+W1'W3W0'+W1'           W0'+W1'W3W0'+W1'               ]
[  0  0      1 | W0'            W0'+W3'(W1'+W2'+W3')'W1'   W0'+W3'(W1'+W2'+W3')'(W1'+W2') ]

Row 3 premultiplied by -W3'W1 added to row 2
[  1  0      0 | W0'                    W0'                                                   W0'                                                       ]
[  0  1  W1'W3 | W0'+W1'W3W0'-W1'W3W0'  W0'+W1'W3W0'+W1'-W1'W3W0'-W1'W3W3'(W1'+W2'+W3')'W1    W0'+W1'W3W0'+W1'-W1'W3W0'-W1'W3W3'(W1'+W2'+W3')'(W1'+W2') ]               ]
[  0  0      1 |                   W0'                        W0'     +W3'(W1'+W2'+W3')'W1'                         W0'     +W3'(W1'+W2'+W3')'(W1'+W2') ]

 W0'+W1'W3W0'-W1'W3W0' = W0'

 W0'+W1'W3W0'+W1'-W1'W3W0'-W1'W3W3'(W1'+W2'+W3')'W1 = W0'+W1'-W1'(W1'+W2'+W3')'W1

W0'+W1'W3W0'+W1'-W1'W3W0'-W1'W3W3'(W1'+W2'+W3')'(W1'+W2') = W0'+W1'-W1'(W1'+W2'+W3')'(W1'+W2')

--------- End alternate derivation 2

Row 1 scaled premultiplying by  W0'
[ 1           0       0    | W0' W0' W0' ]
[ -W1       W1+W2   -W2    |  0   1   0  ]
[    -W3      -W2   +W2+W3 |  0   0   1  ]

Row 1 premultiplied by W1 added to row 2
[ 1           0       0    | W0'    W0'      W0'   ]
[ 0         W1+W2   -W2    | W1W0'  W1W0'+1  W1W0' ]
[    -W3      -W2   +W2+W3 |  0       0         1  ]

Row 1 premultiplied by W3 added to row 3
[ 1    0       0    | W0'    W0'      W0'     ]
[ 0  W1+W2   -W2    | W1W0'  W1W0'+1  W1W0'   ]
[ 0    -W2   +W2+W3 | W3W0'  W3W0'    W3W0'+1 ]

*** Alt 5
pre-Scale 2 by (W1+W2)'
[ 1    0       0        | W0'            W0'              W0'           ]
[ 0    1   -(W1+W2)'W2  | (W1+W2)'W1W0'  (W1+W2)'W1W0'+1  (W1+W2)'W1W0' ]
[ 0    -W2   +W2+W3     | W3W0'          W3W0'            W3W0'+1       ]

Add W2 * row 2 to row 3
[ 1    0       0        | W0'            W0'              W0'           ]
[ 0    1   -(W1+W2)'W2  | (W1+W2)'W1W0'  (W1+W2)'W1W0'+1  (W1+W2)'W1W0' ]
[ 0    0   +W2+W3      | W3W0'          W3W0'            W3W0'+1       ]

***

Row 3 added to row 2
[ 1   0       0  | W0'            W0'              W0'           ]
[ 0   W1      W3 | W1W0'+W3W0'    W1W0'+1+W3W0'    W1W0'+W3W0'+1 ]
[ 0  -W2  +W2+W3 |       W3W0'            W3W0'          W3W0'+1 ]

Scale row 2 by premultiplying by W1'  And canceling out W1'W1 terms.
[ 1   0       0  | W0'           W0'               W0'              ]
[ 0   1    W1'W3 | W0'+W1'W3W0'  W0'+W1'+W1'W3W0'  W0'+W1'W3W0'+W1' ]
[ 0  -W2  +W2+W3 | W3W0'         W3W0'             W3W0'+1          ]

Scale row 3 by premuliplying by W2'
[ 1   0       0     | W0'           W0'               W0'              ]
[ 0   1     W1'W3   | W0'+W1'W3W0'  W0'+W1'+W1'W3W0'  W0'+W1'W3W0'+W1' ]
[ 0  -1  W2'(W2+W3) | W2'W3W0'      W2'W3W0'          W2'W3W0'+W2'     ]

Rearrange row 2
   W0'+W1'W3W0'+W1' = W0'+W1'+W1'W3W0'
[ 1   0       0     | W0'           W0'               W0'              ]
[ 0   1     W1'W3   | W0'+W1'W3W0'  W0'+W1'+W1'W3W0'  W0'+W1'+W1'W3W0' ]
[ 0  -1  W2'(W2+W3) | W2'W3W0'      W2'W3W0'          W2'W3W0'+W2'     ]

Add row 2 to row 3
[ 1   0             0     |          W0'                    W0'                            W0'              ]
[ 0   1             W1'W3 |          W0'+W1'W3W0'           W0'+W1'+W1'W3W0'               W0'+W1'+W1'W3W0' ]
[ 0   0  W2'(W2+W3)+W1'W3 | W2'W3W0'+W0'+W1'W3W0'  W2'W3W0'+W0'+W1'+W1'W3W0'  W2'W3W0'+W2'+W0'+W1'+W1'W3W0' ]

Cleanup row 2

W0'+W1'W3W0' = (1+W1'W3)W0'
             = (W3'+W1')W3W0'

W0'+W1'+W1'W3W0' = (1+W1'W0+W1'W3)W0'
                 = W1'(W1+W0+W3)W0'


Cleanup row 3

W2'(W2+W3)+W1'W3 = (W2'+W3')W3 + W1'W3   [ A'(A+B) = (A'+B')B ]
                 = (W2'+W3'+W1')W3       [ right distribution ]
                 = (W1'+W2'+W3')W3       [ Addition commutes. ]

W2'W3W0'+W0'+W1'W3W0' = (W2'W3 + 1 + W1'W3)W0'  [ Right distribution ]
                      = ((W2'+W3'+W1')W3W0'     [ Right distribution ]
                      = (W1'+W2'+W3')W3W0'      [ Association ]

W2'W3W0'+W0'+W1'+W1'W3W0' = (W2'W3 + 1 + W1'W0 + W1'W3)W0'               [ Right distribution ]
                          = (W2'W3 + W1'W3 + W1'W0 + 1)W0'               [ Addition commutes ]
                          = (W2'+W1'+W1'W0W3'+W3')W3W0'                  [ Right distribution ]
                          = (W1'+W2'+W3'+W1'W0W3')W3W0'                  [ Additon commutes ]
                          = (W1'+W2'+W3')W3W0' + W1'W0W3'W3W0'           [ Right distribution ]
                          = (W1'+W2'+W3')W3W0' + W1'W0'                  [ Canceling inverses ]

W2'W3W0'+W2'+W0'+W1'+W1'W3W0' = W2'W3W0'+ W0'+W1'+W1'W3W0'  + W2'  [ Addition commutes ]
                              = (W1'+W2'+W3')W3W0' + W1'W0' + W2'  [ Previous derivation ]

[ 1   0             0    |          W0'                W0'                            W0'               ]
[ 0   1            W1'W3 | (W3'+W1')W3W0'      W1'(W1+W0+W3)W0'           W1'(W1+W0+W3)W0'              ]
[ 0   0  (W1'+W2'+W3')W3 | (W1'+W2'+W3')W3W0'  (W1'+W2'+W3')W3W0'+W1'W0'  (W1'+W2'+W3')W3W0'+W1'W0'+W2' ]

Scaling row three by premultiplying by (W1'+W2'+W3')'
[ 1   0    0   |            W0'                   W0'                        W0'                 ]
[ 0   1  W1'W3 | (W3'+W1')W3W0'      W1'(W1+W0+W3)W0'           W1'(W1+W0+W3)W0'                 ]
[ 0   0     W3 |          W3W0'     W3W0'+(W1'+W2'+W3')'W1'W0'  W3W0'+(W1'+W2'+W3')'(W1'W0'+W2') ]

Scaling row three by premultiplying by W3'
[ 1   0    0   |            W0'                W0'                           W0'                  ]
[ 0   1  W1'W3 | (W3'+W1')W3W0'      W1'(W1+W0+W3)W0'           W1'(W1+W0+W3)W0'                  ]
[ 0   0    1   |            W0'    W0'+W3'(W1'+W2'+W3')'W1'W0'  W0'+W3'(W1'+W2'+W3')'(W1'W0'+W2') ]

*** Notes to myself

What can we simplify?

  \(\A+\B)
= A  -  A \(A+B) A
= B  -  B \(A+B) B

\A \(\A+\B)    =   \(A+B) B

\(\A+\B) = A \(A+B) B

*** End notes.

Row three premultiplied by -W3'W1 added to row 2




=========================================

*Clearly wrong.  The original is symmetric, so the inverse must be. *
The old file (lsexamples.html.old) came out symmetric, so I know it is a
problem in converting the notation over...

***** WORKING ****

[ W0+W1+W3   -W1         -W3 ] [ P1 ] = [ W0  -W1    0   W3 ] [ S0 ]
[   -W1       W1+W2   -W2    ] [ P2 ]   [  0   W1  -W2    0 ] [ S1 ]
[      -W3      -W2   +W2+W3 ] [ P3 ]   [  0    0   W2  -W3 ] [ S2 ]

Example five

[*** Under construction ***]

Least squares example five, by elementary row transformations.

Problem:
[ W0+W1+W2+W3    -W1-W2       -W3    ] [ P1 ]   [ WO -W1 -W2 -W3   0 ] [ SO ]
[   -W1-W2       +W1+W2+W4       -W4 ] [ P2 ] = [  0  W1  W2   0  W4 ] [ S1 ]
[         -W3          -W4    +W3+W4 ] [ P3 ]   [  0   0   0  W3 -W4 ] [ S2 ]
                                                                       [ S3 ]
                                                                       [ S4 ]
Setup for inverse:
[ W0+W1+W2+W3    -W1-W2       -W3    | 1 0 0 ]
[   -W1-W2       +W1+W2+W4       -W4 | 0 1 0 ]
[         -W3          -W4    +W3+W4 | 0 0 1 ]

-------- ALT 1

Add row 3 to row 1
[ W0+W1+W2       -W1-W2-W4       +W4 | 1 0 1 ]
[   -W1-W2       +W1+W2+W4       -W4 | 0 1 0 ]
[         -W3          -W4    +W3+W4 | 0 0 1 ]

Add row 2 to row 1
[ W0                 0             0 | 1 1 1 ]
[   -W1-W2       +W1+W2+W4       -W4 | 0 1 0 ]
[         -W3          -W4    +W3+W4 | 0 0 1 ]

Scale row 1 by premultiplying by W0'
[ 1                  0             0 | W0'  W0'  W0' ]
[   -W1-W2       +W1+W2+W4       -W4 |  0    1    0  ]
[         -W3          -W4    +W3+W4 |  0    0    1  ]

Row 1 premultiplied by W1+W2 added to row 2
[ 1          0             0 | W0'        W0'            W0'       ]
[ 0      +W1+W2+W4       -W4 | (W1+W2)W0' 1+(W1+W2)W0'  (W1+W2)W0' ]
[ -W3          -W4    +W3+W4 |  0         0               1        ]

Row 1 premultiplied by W3 added to row 3
[ 1      0             0 | W0'            W0'               W0'    ]
[ 0  +W1+W2+W4       -W4 | (W1+W2)W0'    1+(W1+W2)W0'   (W1+W2)W0' ]
[ 0        -W4    +W3+W4 | W3W0'         W3W0'             W3W0'+1 ]

Row 3 added to row 2
[ 1      0        0    | W0'                 W0'                  W0'                ]
[ 0  +W1+W2     +W3    | W3W0'+(W1+W2)W0'    W3W0'+1+(W1+W2)W0'   W3W0'+1+(W1+W2)W0' ]
[ 0      -W4    +W3+W4 | W3W0'               W3W0'                W3W0'+1            ]

-------- ALT 3

Row 2 premultiplied by W4(W1+W2)' added to row 3
[ 1      0        0              | W0'                                         W0'                                                     W0'                                                     ]
[ 0  +W1+W2     +W3              | W3W0'+(W1+W2)W0'                            W3W0'+1+(W1+W2)W0'                                      W3W0'+1+(W1+W2)W0'                                      ]
[ 0      0    W4(W1+W2)'W3+W3+W4 | W3W0'+W4(W1+W2)'W3W0'+W4(W1+W2)'(W1+W2)W0'  W3W0'+W4(W1+W2)'W3W0'+W4(W1+W2)'+W4(W1+W2)'(W1+W2)W0'   W3W0'+1+W4(W1+W2)'W3W0'+W4(W1+W2)'+W4(W1+W2)'(W1+W2)W0' ]

W4(W1+W2)'W3+W3+W4                                      = W4(W1+W2)'W3+W4(W3'+W4')W3
                                                        = W4((W1+W2)'+W3'+W4')W3

W3W0'+W4(W1+W2)'W3W0'+W4(W1+W2)'(W1+W2)W0'              = W3W0'+W4(W1+W2)'W3W0'+W4W0'
                                                        = (W3+W4(W1+W2)'W3+W4)W0'
                                                        = W4((W1+W2)'+W3'+W4')W3W0'

W3W0'+W4(W1+W2)'W3W0'+W4(W1+W2)'+W4(W1+W2)'(W1+W2)W0'   = W3W0'+W4(W1+W2)'W3W0'+W4(W1+W2)'+W4W0'
                                                        = (W3+W4(W1+W2)'W3+W4)W0'+W4(W1+W2)'
                                                        = W4((W1+W2)'+W3'+W4')W3W0'+W4(W1+W2)'

W3W0'+1+W4(W1+W2)'W3W0'+W4(W1+W2)'+W4(W1+W2)'(W1+W2)W0' = W3W0'+1+W4(W1+W2)'W3W0'+W4(W1+W2)'+W4W0'
                                                        = (W3+W4(W1+W2)'W3+W4)W0'+W4(W1+W2)'+1
                                                        = W4((W1+W2)'+W3'+W4')W3W0'+W4(W1+W2)'+1

[ 1      0        0                  | W0'                        W0'                                   W0'                                    ]
[ 0  +W1+W2     +W3                  | W3W0'+(W1+W2)W0'           W3W0'+1+(W1+W2)W0'                    W3W0'+1+(W1+W2)W0'                     ]
[ 0      0    W4((W1+W2)'+W3'+W4')W3 | W4((W1+W2)'+W3'+W4')W3W0'  W4((W1+W2)'+W3'+W4')W3W0'+W4(W1+W2)'  W4((W1+W2)'+W3'+W4')W3W0'+W4(W1+W2)'+1 ]

Premultiply row 3 by ( W4((W1+W2)'+W3'+W4')W3 )' = W3'(W1+W2)'+W3'+W4')'W4'
[ 1      0        0                  | W0'                         W0'                                   W0'                     ]
[ 0  +W1+W2     +W3                  | W3W0'+(W1+W2)W0'            W3W0'+1+(W1+W2)W0'                    W3W0'+1+(W1+W2)W0'      ]
[ 0      0     1 | W0'  W0'+W3'(W1+W2)'+W3'+W4')'W4'W4(W1+W2)'  W0'+W3'((W1+W2)'+W3'+W4')'W4'W4(W1+W2)'+W3'(W1+W2)'+W3'+W4')'W4' ]

W0'+W3'(W1+W2)'+W3'+W4')'W4'W4(W1+W2)' = W0'+W3'(W1+W2)'+W3'+W4')'(W1+W2)'

W0'+W3'(W1+W2)'+W3'+W4')'W4'W4(W1+W2)'+W3'(W1+W2)'+W3'+W4')'W4'
  = W0'+W3'(W1+W2)'+W3'+W4')'(W1+W2)'+W3'(W1+W2)'+W3'+W4')'W4'
  = W0'+W3'(W1+W2)'+W3'+W4')'((W1+W2)'+W4')

[ 1      0     0  | W0'               W0'                                 W0'                                     ]
[ 0  +W1+W2    W3 | W3W0'+(W1+W2)W0'  W3W0'+1+(W1+W2)W0'                  W3W0'+1+(W1+W2)W0'                      ]
[ 0      0     1  | W0'               W0'+W3'(W1+W2)'+W3'+W4')'(W1+W2)'   W0'+W3'(W1+W2)'+W3'+W4')'((W1+W2)'+W4') ]

Row 3 premultiplied by -W3
[ 1      0     0  | W0'                     W0'                                 W0'                                     ]
[ 0  +W1+W2    0  | W3W0'+(W1+W2)W0'-W3W0'  W3W0'+1+(W1+W2)W0'-W3W0'-W3'(W1+W2)'+W3'+W4')'(W1+W2)'                  W3W0'+1+(W1+W2)W0'                      ]
[ 0      0     1  | W0'                     W0'+W3'(W1+W2)'+W3'+W4')'(W1+W2)'   W0'+W3'(W1+W2)'+W3'+W4')'((W1+W2)'+W4') ]



--------- End alt 3

Row 2 scaled by premultiplying by (W1+W2)'
[ 1    0       0        | W0'                 W0'                         W0'                        ]
[ 0    1     (W1+W2)'W3 | (W1+W2)'W3W0'+W0'   (W1+W2)'W3W0'+(W1+W2)'+W0'  (W1+W2)'W3W0'+(W1+W2)'+W0' ]
[ 0   -W4    +W3+W4     | W3W0'               W3W0'                       W3W0'+1                    ]

Row 2 premultiplied by W4 added to row 3
[ 1    0       0                | W0'                               W0'                                W0'                                      ]
[ 0    1     (W1+W2)'W3         | (W1+W2)'W3W0'+W0'            (W1+W2)'W3W0'+(W1+W2)'+W0'             (W1+W2)'W3W0'+(W1+W2)'+W0'                ]
[ 0    0    +W3+W4+W4(W1+W2)'W3 | W3W0'+W4(W1+W2)'W3W0'+W4W0'  W3W0'+W4(W1+W2)'W3W0'+W4(W1+W2)'+W4W0'  W3W0'+1+W4(W1+W2)'W3W0'+W4(W1+W2)'+W4W0' ]

W3+W4+W4(W1+W2)'W3 =
                   =  W4+W3+W4(W1+W2)'W3
                   =  W4(W4'+W3')W3 + W4(W1+W2)'W3
                   =  W4(W4'+W3'+W1+W2)W3

W3W0'+W4(W1+W2)'W3W0'+W4W0' = (W3+W4(W1+W2)'W3+W4)W0'
                            = W4(W4'+W3'+W1+W2)W3W0'

W3W0'+W4(W1+W2)'W3W0'+W4(W1+W2)'+W4W0' = (W3+W4(W1+W2)'W3+W4)W0'+W4(W1+W2)'
                                       = W4(W4'+W3'+W1+W2)W3W0'+W4(W1+W2)'

W3W0'+1+W4(W1+W2)'W3W0'+W4(W1+W2)'+W4W0' = (W3+W4(W1+W2)'W3+W4)W0'+W4(W1+W2)'+1

[ 1    0       0                | W0'                               W0'                                W0'                        ]
[ 0    1     (W1+W2)'W3         | (W1+W2)'W3W0'+W0'         (W1+W2)'W3W0'+(W1+W2)'+W0'        (W1+W2)'W3W0'+(W1+W2)'+W0'          ]
[ 0    0    W4(W4'+W3'+W1+W2)W3 | W4(W4'+W3'+W1+W2)W3W0'  W4(W4'+W3'+W1+W2)W3W0'+W4(W1+W2)'  (W3+W4(W1+W2)'W3+W4)W0'+W4(W1+W2)'+1 ]

Premultiply row 3 by ( W4(W4'+W3'+W1+W2)W3 )' = W3'(W4'+W3'+W1+W2)'W4'
[ 1    0    0          | W0'                W0'                                   W0'                                                         ]
[ 0    1   (W1+W2)'W3  | (W1+W2)'W3W0'+W0' (W1+W2)'W3W0'+(W1+W2)'+W0'             (W1+W2)'W3W0'+(W1+W2)'+W0'                                  ]
[ 0    0    1          | W0'                W0'+W3'(W4'+W3'+W1+W2)'W4'W4(W1+W2)'  W0'+W3'(W4'+W3'+W1+W2)'W4'W4(W1+W2)'+W3'(W4'+W3'+W1+W2)'W4' ]

W0'+W3'(W4'+W3'+W1+W2)'W4'W4(W1+W2)' = W0'+W3'(W4'+W3'+W1+W2)'W4'W4(W1+W2)'
                                     = W0'+W3'(W4'+W3'+W1+W2)'(W1+W2)'

W0'+W3'(W4'+W3'+W1+W2)'W4'W4(W1+W2)'+W3'(W4'+W3'+W1+W2)'W4'
  = W0'+W3'(W4'+W3'+W1+W2)'(W1+W2)'+W3'(W4'+W3'+W1+W2)'W4'
  = W0'+W3'(W4'+W3'+W1+W2)'((W1+W2)'+W4')

[ 1    0    0          | W0'                W0'                              W0'                                   ]
[ 0    1   (W1+W2)'W3  | (W1+W2)'W3W0'+W0' (W1+W2)'W3W0'+(W1+W2)'+W0'        (W1+W2)'W3W0'+(W1+W2)'+W0'            ]
[ 0    0    1          | W0'                W0'+W3'(W4'+W3'+W1+W2)'(W1+W2)'  W0'+W3'(W4'+W3'+W1+W2)'((W1+W2)'+W4') ]

Add


-------- END ALT 1

Row 3 added to row 2
[ W0+W1+W2+W3    -W1-W2       -W3    | 1 0 0 ]
[   -W1-W2-W3    +W1+W2       +W3    | 0 1 1 ]
[         -W3          -W4    +W3+W4 | 0 0 1 ]

Row 2 added to row 1
[ W0                0          0     | 1 1 1 ]
[   -W1-W2-W3    +W1+W2       +W3    | 0 1 1 ]
[         -W3          -W4    +W3+W4 | 0 0 1 ]

Row 1 pre or post multiplied by W0'
[  1               0          0     | W0'  W0'  W0' ]
[  -W1-W2-W3    +W1+W2       +W3    | 0     1    1  ]
[        -W3          -W4    +W3+W4 | 0     0    1  ]

Row 1 * (W1+W2+W3) added to row 2
[  1      0      0    | W0'  W0'              W0'             ]
[  0   +W1+W2  +W3    | 0    W0'(W1+W2+W3)+1  W0'(W1+W2+W3)+1 ]
[ -W3   -W4    +W3+W4 | 0     0                1              ]

Row 1 * W3 added to row 3
[  1     0      0    | W0'            W0'              W0'             ]
[  0  +W1+W2  +W3    | W0'(W1+W2+W3)  W0'(W1+W2+W3)+1  W0'(W1+W2+W3)+1 ]
[  0   -W4    +W3+W4 | W0'W3          W0'W3            W0'W3+1         ]

Partial distribution of row 2
[  1     0      0    | W0'               W0'                 W0'                ]
[  0  +W1+W2  +W3    | W0'(W1+W2)+W0'W3  W0'(W1+W2)+W0'W3+1  W0'(W1+W2)+W0'W3+1 ]
[  0   -W4    +W3+W4 | W0'W3             W0'W3               W0'W3+1            ]

Row 2 * (W1+W2)'
[  1    0        0      | W0'                W0'                         W0'                        ]
[  0    1   +W3(W1+W2)' | W0'+W0'W3(W1+W2)'  W0'+W0'W3(W1+W2)'+(W1+W2)'  W0'+W0'W3(W1+W2)'+(W1+W2)' ]
[  0  -W4   +W3+W4      | W0'W3              W0'W3                       W0'W3+1                    ]

Row 3 * W4
[  1   0       0      | W0'                W0'                         W0'                        ]
[  0   1  +W3(W1+W2)' | W0'+W0'W3(W1+W2)'  W0'+W0'W3(W1+W2)'+(W1+W2)'  W0'+W0'W3(W1+W2)'+(W1+W2)' ]
[  0  -1   +W3W4'+1   | W0'W3W4'           W0'W3W4'                    W0'W3W4'+W4                ]

Row 3 added to row 2
[ 1  0               0      |          W0'                         W0'                                     W0'                        ]
[ 0  1          +W3(W1+W2)' |          W0'+W0'W3(W1+W2)'           W0'+W0'W3(W1+W2)'+(W1+W2)'              W0'+W0'W3(W1+W2)'+(W1+W2)' ]
[ 0  0  +W3W4'+1+W3(W1+W2)' | W0'W3W4'+W0'+W0'W3(W1+W2)'  W0'W3W4'+W0'+W0'W3(W1+W2)'+(W1+W2)'  W0'W3W4'+W4+W0'+W0'W3(W1+W2)'+(W1+W2)' ]

Cleanup row 3

+W3W4'+1+W3(W1+W2)' = W3(W4'+(W1+W2)')+1

W0'W3W4'+W0'+W0'W3(W1+W2)' = W0'(W3W4'+1+W3(W1+W2)')
                           = W0'(W3(W4'+(W1+W2)')+1)

W0'W3W4'+W0'+W0'W3(W1+W2)'+(W1+W2)' = W0'(W3(W4'+(W1+W2)')+1) + (W1+W2)'

[ 1  0               0      | W0'                      W0'                                W0'                              ]
[ 0  1          +W3(W1+W2)' | W0'+W0'W3(W1+W2)'        W0'+W0'W3(W1+W2)'+(W1+W2)'         W0'+W0'W3(W1+W2)'+(W1+W2)'       ]
[ 0  0  W3(W4'+(W1+W2)')+1  | W0'(W3(W4'+(W1+W2)')+1)  W0'(W3(W4'+(W1+W2)')+1)+(W1+W2)'   W0'(W3(W4'+(W1+W2)')+1)+(W1+W2)' ]

Row 3 multiplied by (W3(W4'+(W1+W2)')+1)' abbreviated as u'
[ 1  0     0        | W0'                W0'                          W0'                         ]
[ 0  1  +W3(W1+W2)' | W0'+W0'W3(W1+W2)'  W0'+W0'W3(W1+W2)'+(W1+W2)'   W0'+W0'W3(W1+W2)'+(W1+W2)'  ]
[ 0  0     1        | W0'                W0'+(W1+W2)'u'               W0'+(W1+W2)'u'              ]

Row 3 * +W3(W1+W2)' subtracted from row 2
[ 1  0  0 | W0'  W0'                      W0'                     ]
[ 0  1  0 | W0'  W0'+(W1+W2)'-(W1+W2)'u'  W0'+(W1+W2)'-(W1+W2)'u' ]
[ 0  0  1 | W0'  W0'+(W1+W2)'u'           W0'+(W1+W2)'u'          ]

*Clearly wrong... the original is symmetric, so the inverse has to be symmetric.*

*** REWORK ***
[ W0+W1+W2+W3    -W1-W2       -W3    ] [ P1 ]   [ WO -W1 -W2 -W3   0 ] [ SO ]
[   -W1-W2       +W1+W2+W4       -W4 ] [ P2 ] = [  0  W1  W2   0  W4 ] [ S1 ]
[         -W3          -W4    +W3+W4 ] [ P3 ]   [  0   0   0  W3 -W4 ] [ S2 ]
                                                                       [ S3 ]
                                                                       [ S4 ]

Go to ...


This page is http://www.cc.utah.edu/~nahaj/cave/survey/intro/lsexamples.html
© Copyright 2000 by John Halleck, All Rights Reserved.
This snapshot was last modified on January 24th, 2001