Sponsored links: Algebra eBooks
 

Related

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,0,0,0];

s2 : [0,1,-1,0];

Calculate

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,-1,0,0,0];

s2 : [0,1,0,0,0];

Calculate

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,0,0,0];

s2 : [0,1,-1,0];

Calculate

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,0,0,0];

s2 : [0,1,-1,0];

Calculate

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,-1,0,0,0];

s2 : [0,1,0,0,0];

Calculate

color-globalsolve-linsolve

refl(v,a) := v - 2*a*...

s1 : [1,-1,0,0,0];

s2 : [0,1,0,0,0];

Calculate

color-globalsolve-linsolve

/* [wxMaxima: input ...

s1 : [1,0,0,0];

s2 : [0,1,-1,0];

Calculate

color

? ??color;

Calculate

color

Run Example
(%i1)refl(v,a) := v - 2*a*(v.a)/(a.a);
                                           2 a (v . a)
(%o1)                    refl(v, a) := v - -----------
                                              a . a
(%i2) s1 : [1,0,0,0];
(%o2)                            [1, 0, 0, 0]
(%i3) s2 : [0,1,-1,0];
(%o3)                           [0, 1, - 1, 0]
(%i4) s3 : [0,0,1,-1];
(%o4)                           [0, 0, 1, - 1]
(%i5) d1 : d11 * s1 + d12 * s2 + d13 * s3;
(%o5)                    [d11, d12, d13 - d12, - d13]
(%i6) e11 : d1.s1 = 1;
(%o6)                               d11 = 1
(%i7) e12 : d1.s2 = -1;
(%o7)                          2 d12 - d13 = - 1
(%i8) e13 : d1.s3 = 1;
(%o8)                           2 d13 - d12 = 1
(%i9) [globalsolve:true];
(%o9)                               [true]
(%i10) linsolve ([e11,e12,e13], [d11,d12,d13]);
                                           1        1
(%o10)                   [d11 : 1, d12 : - -, d13 : -]
                                           3        3
(%i11) d2 : d21 * s1 + d22 * s2 + d23 * s3;
(%o11)                   [d21, d22, d23 - d22, - d23]
(%i12) e21 : d2.s1 = 1;
(%o12)                              d21 = 1
(%i13) e22 : d2.s2 = 1;
(%o13)                          2 d22 - d23 = 1
(%i14) e23 : d2.s3 = -1;
(%o14)                         2 d23 - d22 = - 1
(%i15) [globalsolve:true];
(%o15)                              [true]
(%i16) linsolve ([e21,e22,e23], [d21,d22,d23]);
                                         1          1
(%o16)                   [d21 : 1, d22 : -, d23 : - -]
                                         3          3
(%i17) d3 : d31 * s1 + d32 * s2 + d33 * s3;
(%o17)                   [d31, d32, d33 - d32, - d33]
(%i18) e31 : d3.s1 = -1;
(%o18)                             d31 = - 1
(%i19) e32 : d3.s2 = 1;
(%o19)                          2 d32 - d33 = 1
(%i20) e33 : d3.s3 = 0;
(%o20)                          2 d33 - d32 = 0
(%i21) [globalsolve:true];
(%o21)                              [true]
(%i22) linsolve ([e31,e32,e33], [d31,d32,d33]);
                                           2        1
(%o22)                   [d31 : - 1, d32 : -, d33 : -]
                                           3        3
(%i23) d4 : d41 * s1 + d42 * s2 + d43 * s3;
(%o23)                   [d41, d42, d43 - d42, - d43]
(%i24) e41 : d4.s1 = -1;
(%o24)                             d41 = - 1
(%i25) e42 : d4.s2 = 0;
(%o25)                          2 d42 - d43 = 0
(%i26) e43 : d4.s3 = 1;
(%o26)                          2 d43 - d42 = 1
(%i27) [globalsolve:true];
(%o27)                              [true]
(%i28) linsolve ([e41,e42,e43], [d41,d42,d43]);
                                           1        2
(%o28)                   [d41 : - 1, d42 : -, d43 : -]
                                           3        3
(%i29) color : ''d3;
                                    2    1    1
(%o29)                        [- 1, -, - -, - -]
                                    3    3    3
(%i30) vect : refl(color,s1);
                                   2    1    1
(%o30)                         [1, -, - -, - -]
                                   3    3    3
(%i31) eq1 : a1*(''d1)[1] + a2*(''d2)[1] + a3*(''d3)[1] + a4*(''d4)[1] = vect[1];
(%o31)                      - a4 - a3 + a2 + a1 = 1
(%i32) eq2 : a1*(''d1)[2] + a2*(''d2)[2] + a3*(''d3)[2] + a4*(''d4)[2] = vect[2];
                            a4   2 a3   a2   a1   2
(%o32)                      -- + ---- + -- - -- = -
                            3     3     3    3    3
(%i33) eq3 : a1*(''d1)[3] + a2*(''d2)[3] + a3*(''d3)[3] + a4*(''d4)[3] = vect[3];
                          a4   a3   2 a2   2 a1     1
(%o33)                    -- - -- - ---- + ---- = - -
                          3    3     3      3       3
(%i34) eq4 : a1*(''d1)[4] + a2*(''d2)[4] + a3*(''d3)[4] + a4*(''d4)[4] = vect[4];
                            2 a4   a3   a2   a1     1
(%o34)                    - ---- - -- + -- - -- = - -
                             3     3    3    3      3
(%i35) linsolve([eq1,eq2,eq3,eq4],[a1,a2,a3,a4]);

solve: dependent equations eliminated: (4)
                    %r1 - 2       %r1 + 2
(%o35)      [a1 : - -------, a2 : -------, a3 : 1 - %r1, a4 : %r1]
                       2             2
(%i36) vect : refl(color,s2);
                                      1  2    1
(%o36)                        [- 1, - -, -, - -]
                                      3  3    3
(%i37) eq1 : b1*(''d1)[1] + b2*(''d2)[1] + b3*(''d3)[1] + b4*(''d4)[1] = vect[1];
(%o37)                     - b4 - b3 + b2 + b1 = - 1
(%i38) eq2 : b1*(''d1)[2] + b2*(''d2)[2] + b3*(''d3)[2] + b4*(''d4)[2] = vect[2];
                           b4   2 b3   b2   b1     1
(%o38)                     -- + ---- + -- - -- = - -
                           3     3     3    3      3
(%i39) eq3 : b1*(''d1)[3] + b2*(''d2)[3] + b3*(''d3)[3] + b4*(''d4)[3] = vect[3];
                           b4   b3   2 b2   2 b1   2
(%o39)                     -- - -- - ---- + ---- = -
                           3    3     3      3     3
(%i40) eq4 : b1*(''d1)[4] + b2*(''d2)[4] + b3*(''d3)[4] + b4*(''d4)[4] = vect[4];
                            2 b4   b3   b2   b1     1
(%o40)                    - ---- - -- + -- - -- = - -
                             3     3    3    3      3
(%i41) linsolve([eq1,eq2,eq3,eq4],[b1,b2,b3,b4]);

solve: dependent equations eliminated: (4)
                       %r2       %r2 - 2
(%o41)         [b1 : - ---, b2 : -------, b3 : - %r2, b4 : %r2]
                        2           2
(%i42) vect : refl(color,s3);
                                    2    1    1
(%o42)                        [- 1, -, - -, - -]
                                    3    3    3
(%i43) eq1 : c1*(''d1)[1] + c2*(''d2)[1] + c3*(''d3)[1] + c4*(''d4)[1] = vect[1];
(%o43)                     - c4 - c3 + c2 + c1 = - 1
(%i44) eq2 : c1*(''d1)[2] + c2*(''d2)[2] + c3*(''d3)[2] + c4*(''d4)[2] = vect[2];
                            c4   2 c3   c2   c1   2
(%o44)                      -- + ---- + -- - -- = -
                            3     3     3    3    3
(%i45) eq3 : c1*(''d1)[3] + c2*(''d2)[3] + c3*(''d3)[3] + c4*(''d4)[3] = vect[3];
                          c4   c3   2 c2   2 c1     1
(%o45)                    -- - -- - ---- + ---- = - -
                          3    3     3      3       3
(%i46) eq4 : c1*(''d1)[4] + c2*(''d2)[4] + c3*(''d3)[4] + c4*(''d4)[4] = vect[4];
                            2 c4   c3   c2   c1     1
(%o46)                    - ---- - -- + -- - -- = - -
                             3     3    3    3      3
(%i47) linsolve([eq1,eq2,eq3,eq4],[c1,c2,c3,c4]);

solve: dependent equations eliminated: (4)
                        %r3       %r3
(%o47)          [c1 : - ---, c2 : ---, c3 : 1 - %r3, c4 : %r3]
                         2         2
(%i48) vect : refl(refl(color,s2),s3);
                                      1    1  2
(%o48)                        [- 1, - -, - -, -]
                                      3    3  3
(%i49) eq1 : e1*(''d1)[1] + e2*(''d2)[1] + e3*(''d3)[1] + e4*(''d4)[1] = vect[1];
(%o49)                     - e4 - e3 + e2 + e1 = - 1
(%i50) eq2 : e1*(''d1)[2] + e2*(''d2)[2] + e3*(''d3)[2] + e4*(''d4)[2] = vect[2];
                           e4   2 e3   e2   e1     1
(%o50)                     -- + ---- + -- - -- = - -
                           3     3     3    3      3
(%i51) eq3 : e1*(''d1)[3] + e2*(''d2)[3] + e3*(''d3)[3] + e4*(''d4)[3] = vect[3];
                          e4   e3   2 e2   2 e1     1
(%o51)                    -- - -- - ---- + ---- = - -
                          3    3     3      3       3
(%i52) eq4 : e1*(''d1)[4] + e2*(''d2)[4] + e3*(''d3)[4] + e4*(''d4)[4] = vect[4];
                             2 e4   e3   e2   e1   2
(%o52)                     - ---- - -- + -- - -- = -
                              3     3    3    3    3
(%i53) linsolve([eq1,eq2,eq3,eq4],[e1,e2,e3,e4]);

solve: dependent equations eliminated: (4)
                   %r4 + 3       %r4 - 1
(%o53)     [e1 : - -------, e2 : -------, e3 : - %r4 - 1, e4 : %r4]
                      2             2
(%i54) vect : refl(refl(color,s3),s2);
                                      1  2    1
(%o54)                        [- 1, - -, -, - -]
                                      3  3    3
(%i55) eq1 : f1*(''d1)[1] + f2*(''d2)[1] + f3*(''d3)[1] + f4*(''d4)[1] = vect[1];
(%o55)                     - f4 - f3 + f2 + f1 = - 1
(%i56) eq2 : f1*(''d1)[2] + f2*(''d2)[2] + f3*(''d3)[2] + f4*(''d4)[2] = vect[2];
                           f4   2 f3   f2   f1     1
(%o56)                     -- + ---- + -- - -- = - -
                           3     3     3    3      3
(%i57) eq3 : f1*(''d1)[3] + f2*(''d2)[3] + f3*(''d3)[3] + f4*(''d4)[3] = vect[3];
                           f4   f3   2 f2   2 f1   2
(%o57)                     -- - -- - ---- + ---- = -
                           3    3     3      3     3
(%i58) eq4 : f1*(''d1)[4] + f2*(''d2)[4] + f3*(''d3)[4] + f4*(''d4)[4] = vect[4];
                            2 f4   f3   f2   f1     1
(%o58)                    - ---- - -- + -- - -- = - -
                             3     3    3    3      3
(%i59) linsolve([eq1,eq2,eq3,eq4],[f1,f2,f3,f4]);

solve: dependent equations eliminated: (4)
                       %r5       %r5 - 2
(%o59)         [f1 : - ---, f2 : -------, f3 : - %r5, f4 : %r5]
                        2           2
(%i60) vect : refl(refl(refl(color,s2),s3),s2);
                                      1    1  2
(%o60)                        [- 1, - -, - -, -]
                                      3    3  3
(%i61) eq1 : g1*(''d1)[1] + g2*(''d2)[1] + g3*(''d3)[1] + g4*(''d4)[1] = vect[1];
(%o61)                     - g4 - g3 + g2 + g1 = - 1
(%i62) eq2 : g1*(''d1)[2] + g2*(''d2)[2] + g3*(''d3)[2] + g4*(''d4)[2] = vect[2];
                           g4   2 g3   g2   g1     1
(%o62)                     -- + ---- + -- - -- = - -
                           3     3     3    3      3
(%i63) eq3 : g1*(''d1)[3] + g2*(''d2)[3] + g3*(''d3)[3] + g4*(''d4)[3] = vect[3];
                          g4   g3   2 g2   2 g1     1
(%o63)                    -- - -- - ---- + ---- = - -
                          3    3     3      3       3
(%i64) eq4 : g1*(''d1)[4] + g2*(''d2)[4] + g3*(''d3)[4] + g4*(''d4)[4] = vect[4];
                             2 g4   g3   g2   g1   2
(%o64)                     - ---- - -- + -- - -- = -
                              3     3    3    3    3
(%i65) linsolve([eq1,eq2,eq3,eq4],[g1,g2,g3,g4]);

solve: dependent equations eliminated: (4)
                   %r6 + 3       %r6 - 1
(%o65)     [g1 : - -------, g2 : -------, g3 : - %r6 - 1, g4 : %r6]
                      2             2
(%i66) vect : refl(color,s1);
                                   2    1    1
(%o66)                         [1, -, - -, - -]
                                   3    3    3
(%i67) eq1 : x1*(''d1)[1] + x2*(''d2)[1] + x3*(''d3)[1] + x4*(''d4)[1] = vect[1];
(%o67)                      - x4 - x3 + x2 + x1 = 1
(%i68) eq2 : x1*(''d1)[2] + x2*(''d2)[2] + x3*(''d3)[2] + x4*(''d4)[2] = vect[2];
                            x4   2 x3   x2   x1   2
(%o68)                      -- + ---- + -- - -- = -
                            3     3     3    3    3
(%i69) eq3 : x1*(''d1)[3] + x2*(''d2)[3] + x3*(''d3)[3] + x4*(''d4)[3] = vect[3];
                          x4   x3   2 x2   2 x1     1
(%o69)                    -- - -- - ---- + ---- = - -
                          3    3     3      3       3
(%i70) eq4 : x1*(''d1)[4] + x2*(''d2)[4] + x3*(''d3)[4] + x4*(''d4)[4] = vect[4];
                            2 x4   x3   x2   x1     1
(%o70)                    - ---- - -- + -- - -- = - -
                             3     3    3    3      3
(%i71) linsolve([eq1,eq2,eq3,eq4],[x1,x2,x3,x4]);

solve: dependent equations eliminated: (4)
                    %r7 - 2       %r7 + 2
(%o71)      [x1 : - -------, x2 : -------, x3 : 1 - %r7, x4 : %r7]
                       2             2
(%i72) vect : refl(refl(color,s1),s2);
                                     1  2    1
(%o72)                         [1, - -, -, - -]
                                     3  3    3
(%i73) eq1 : y1*(''d1)[1] + y2*(''d2)[1] + y3*(''d3)[1] + y4*(''d4)[1] = vect[1];
(%o73)                      - y4 - y3 + y2 + y1 = 1
(%i74) eq2 : y1*(''d1)[2] + y2*(''d2)[2] + y3*(''d3)[2] + y4*(''d4)[2] = vect[2];
                           y4   2 y3   y2   y1     1
(%o74)                     -- + ---- + -- - -- = - -
                           3     3     3    3      3
(%i75) eq3 : y1*(''d1)[3] + y2*(''d2)[3] + y3*(''d3)[3] + y4*(''d4)[3] = vect[3];
                           y4   y3   2 y2   2 y1   2
(%o75)                     -- - -- - ---- + ---- = -
                           3    3     3      3     3
(%i76) eq4 : y1*(''d1)[4] + y2*(''d2)[4] + y3*(''d3)[4] + y4*(''d4)[4] = vect[4];
                            2 y4   y3   y2   y1     1
(%o76)                    - ---- - -- + -- - -- = - -
                             3     3    3    3      3
(%i77) linsolve([eq1,eq2,eq3,eq4],[y1,y2,y3,y4]);

solve: dependent equations eliminated: (4)
                       %r8 - 2       %r8
(%o77)         [y1 : - -------, y2 : ---, y3 : - %r8, y4 : %r8]
                          2           2
(%i78) vect : refl(refl(color,s1),s3);
                                   2    1    1
(%o78)                         [1, -, - -, - -]
                                   3    3    3
(%i79) eq1 : z1*(''d1)[1] + z2*(''d2)[1] + z3*(''d3)[1] + z4*(''d4)[1] = vect[1];
(%o79)                      - z4 - z3 + z2 + z1 = 1
(%i80) eq2 : z1*(''d1)[2] + z2*(''d2)[2] + z3*(''d3)[2] + z4*(''d4)[2] = vect[2];
                            z4   2 z3   z2   z1   2
(%o80)                      -- + ---- + -- - -- = -
                            3     3     3    3    3
(%i81) eq3 : z1*(''d1)[3] + z2*(''d2)[3] + z3*(''d3)[3] + z4*(''d4)[3] = vect[3];
                          z4   z3   2 z2   2 z1     1
(%o81)                    -- - -- - ---- + ---- = - -
                          3    3     3      3       3
(%i82) eq4 : z1*(''d1)[4] + z2*(''d2)[4] + z3*(''d3)[4] + z4*(''d4)[4] = vect[4];
                            2 z4   z3   z2   z1     1
(%o82)                    - ---- - -- + -- - -- = - -
                             3     3    3    3      3
(%i83) linsolve([eq1,eq2,eq3,eq4],[z1,z2,z3,z4]);

solve: dependent equations eliminated: (4)
                    %r9 - 2       %r9 + 2
(%o83)      [z1 : - -------, z2 : -------, z3 : 1 - %r9, z4 : %r9]
                       2             2
(%i84) vect : refl(refl(refl(color,s1),s2),s3);
                                     1    1  2
(%o84)                         [1, - -, - -, -]
                                     3    3  3
(%i85) eq1 : u1*(''d1)[1] + u2*(''d2)[1] + u3*(''d3)[1] + u4*(''d4)[1] = vect[1];
(%o85)                      - u4 - u3 + u2 + u1 = 1
(%i86) eq2 : u1*(''d1)[2] + u2*(''d2)[2] + u3*(''d3)[2] + u4*(''d4)[2] = vect[2];
                           u4   2 u3   u2   u1     1
(%o86)                     -- + ---- + -- - -- = - -
                           3     3     3    3      3
(%i87) eq3 : u1*(''d1)[3] + u2*(''d2)[3] + u3*(''d3)[3] + u4*(''d4)[3] = vect[3];
                          u4   u3   2 u2   2 u1     1
(%o87)                    -- - -- - ---- + ---- = - -
                          3    3     3      3       3
(%i88) eq4 : u1*(''d1)[4] + u2*(''d2)[4] + u3*(''d3)[4] + u4*(''d4)[4] = vect[4];
                             2 u4   u3   u2   u1   2
(%o88)                     - ---- - -- + -- - -- = -
                              3     3    3    3    3
(%i89) linsolve([eq1,eq2,eq3,eq4],[u1,u2,u3,u4]);

solve: dependent equations eliminated: (4)
                 %r10 + 1       %r10 + 1
(%o89)   [u1 : - --------, u2 : --------, u3 : - %r10 - 1, u4 : %r10]
                    2              2
(%i90) vect : refl(refl(refl(color,s1),s3),s2);
                                     1  2    1
(%o90)                         [1, - -, -, - -]
                                     3  3    3
(%i91) eq1 : r1*(''d1)[1] + r2*(''d2)[1] + r3*(''d3)[1] + r4*(''d4)[1] = vect[1];
(%o91)                      - r4 - r3 + r2 + r1 = 1
(%i92) eq2 : r1*(''d1)[2] + r2*(''d2)[2] + r3*(''d3)[2] + r4*(''d4)[2] = vect[2];
                           r4   2 r3   r2   r1     1
(%o92)                     -- + ---- + -- - -- = - -
                           3     3     3    3      3
(%i93) eq3 : r1*(''d1)[3] + r2*(''d2)[3] + r3*(''d3)[3] + r4*(''d4)[3] = vect[3];
                           r4   r3   2 r2   2 r1   2
(%o93)                     -- - -- - ---- + ---- = -
                           3    3     3      3     3
(%i94) eq4 : r1*(''d1)[4] + r2*(''d2)[4] + r3*(''d3)[4] + r4*(''d4)[4] = vect[4];
                            2 r4   r3   r2   r1     1
(%o94)                    - ---- - -- + -- - -- = - -
                             3     3    3    3      3
(%i95) linsolve([eq1,eq2,eq3,eq4],[r1,r2,r3,r4]);

solve: dependent equations eliminated: (4)
                     %r11 - 2       %r11
(%o95)       [r1 : - --------, r2 : ----, r3 : - %r11, r4 : %r11]
                        2            2
(%i96) vect : refl(refl(refl(refl(color,s1),s2),s3),s2);
                                     1    1  2
(%o96)                         [1, - -, - -, -]
                                     3    3  3
(%i97) eq1 : t1*(''d1)[1] + t2*(''d2)[1] + t3*(''d3)[1] + t4*(''d4)[1] = vect[1];
(%o97)                      - t4 - t3 + t2 + t1 = 1
(%i98) eq2 : t1*(''d1)[2] + t2*(''d2)[2] + t3*(''d3)[2] + t4*(''d4)[2] = vect[2];
                           t4   2 t3   t2   t1     1
(%o98)                     -- + ---- + -- - -- = - -
                           3     3     3    3      3
(%i99) eq3 : t1*(''d1)[3] + t2*(''d2)[3] + t3*(''d3)[3] + t4*(''d4)[3] = vect[3];
                          t4   t3   2 t2   2 t1     1
(%o99)                    -- - -- - ---- + ---- = - -
                          3    3     3      3       3
(%i100) eq4 : t1*(''d1)[4] + t2*(''d2)[4] + t3*(''d3)[4] + t4*(''d4)[4] = vect[4];
                             2 t4   t3   t2   t1   2
(%o100)                    - ---- - -- + -- - -- = -
                              3     3    3    3    3
(%i101) linsolve([eq1,eq2,eq3,eq4],[t1,t2,t3,t4]);

solve: dependent equations eliminated: (4)
                 %r12 + 1       %r12 + 1
(%o101)  [t1 : - --------, t2 : --------, t3 : - %r12 - 1, t4 : %r12]
                    2              2
(%i102) 
Run Example
/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*//* [ Created with wxMaxima version 12.04.0 ] *//* [wxMaxima: input   start ] */refl(v,a) := v - 2*a*(v.a)/(a.a);
                                           2 a (v . a)
(%o1)                    refl(v, a) := v - -----------
                                              a . a
(%i2) s1 : [1,0,0,0];
(%o2)                            [1, 0, 0, 0]
(%i3) s2 : [0,1,-1,0];
(%o3)                           [0, 1, - 1, 0]
(%i4) s3 : [0,0,1,-1];
(%o4)                           [0, 0, 1, - 1]
(%i5) d1 : d11 * s1 + d12 * s2 + d13 * s3;
(%o5)                    [d11, d12, d13 - d12, - d13]
(%i6) e11 : d1.s1 = 1;
(%o6)                               d11 = 1
(%i7) e12 : d1.s2 = -1;
(%o7)                          2 d12 - d13 = - 1
(%i8) e13 : d1.s3 = 1;
(%o8)                           2 d13 - d12 = 1
(%i9) [globalsolve:true];
(%o9)                               [true]
(%i10) linsolve ([e11,e12,e13], [d11,d12,d13]);
                                           1        1
(%o10)                   [d11 : 1, d12 : - -, d13 : -]
                                           3        3
(%i11) d2 : d21 * s1 + d22 * s2 + d23 * s3;
(%o11)                   [d21, d22, d23 - d22, - d23]
(%i12) e21 : d2.s1 = 1;
(%o12)                              d21 = 1
(%i13) e22 : d2.s2 = 1;
(%o13)                          2 d22 - d23 = 1
(%i14) e23 : d2.s3 = -1;
(%o14)                         2 d23 - d22 = - 1
(%i15) [globalsolve:true];
(%o15)                              [true]
(%i16) linsolve ([e21,e22,e23], [d21,d22,d23]);
                                         1          1
(%o16)                   [d21 : 1, d22 : -, d23 : - -]
                                         3          3
(%i17) d3 : d31 * s1 + d32 * s2 + d33 * s3;
(%o17)                   [d31, d32, d33 - d32, - d33]
(%i18) e31 : d3.s1 = -1;
(%o18)                             d31 = - 1
(%i19) e32 : d3.s2 = 1;
(%o19)                          2 d32 - d33 = 1
(%i20) e33 : d3.s3 = 0;
(%o20)                          2 d33 - d32 = 0
(%i21) [globalsolve:true];
(%o21)                              [true]
(%i22) linsolve ([e31,e32,e33], [d31,d32,d33]);
                                           2        1
(%o22)                   [d31 : - 1, d32 : -, d33 : -]
                                           3        3
(%i23) d4 : d41 * s1 + d42 * s2 + d43 * s3;
(%o23)                   [d41, d42, d43 - d42, - d43]
(%i24) e41 : d4.s1 = -1;
(%o24)                             d41 = - 1
(%i25) e42 : d4.s2 = 0;
(%o25)                          2 d42 - d43 = 0
(%i26) e43 : d4.s3 = 1;
(%o26)                          2 d43 - d42 = 1
(%i27) [globalsolve:true];
(%o27)                              [true]
(%i28) linsolve ([e41,e42,e43], [d41,d42,d43]);
                                           1        2
(%o28)                   [d41 : - 1, d42 : -, d43 : -]
                                           3        3
(%i29) [globalsolve:false];
(%o29)                              [false]
(%i30) eq1 : a1*(''d1)[1] + a2*(''d2)[1] + a3*(''d3)[1] + a4*(''d4)[1] = ''vect[1];
(%o30)                    - a4 - a3 + a2 + a1 = vect
                                                    1
(%i31) eq2 : a1*(''d1)[2] + a2*(''d2)[2] + a3*(''d3)[2] + a4*(''d4)[2] = ''vect[2];
                          a4   2 a3   a2   a1
(%o31)                    -- + ---- + -- - -- = vect
                          3     3     3    3        2
(%i32) eq3 : a1*(''d1)[3] + a2*(''d2)[3] + a3*(''d3)[3] + a4*(''d4)[3] = ''vect[3];
                         a4   a3   2 a2   2 a1
(%o32)                   -- - -- - ---- + ---- = vect
                         3    3     3      3         3
(%i33) eq4 : a1*(''d1)[4] + a2*(''d2)[4] + a3*(''d3)[4] + a4*(''d4)[4] = ''vect[4];
                           2 a4   a3   a2   a1
(%o33)                   - ---- - -- + -- - -- = vect
                            3     3    3    3        4
(%i34) color : ''d1;
                                     1  2    1
(%o34)                         [1, - -, -, - -]
                                     3  3    3
(%i35) vect : refl(color,s1);
                                      1  2    1
(%o35)                        [- 1, - -, -, - -]
                                      3  3    3
(%i36) linsolve([eq1,eq2,eq3,eq4],[a1,a2,a3,a4]);
(%o36)                                []
(%i37) vect : refl(color,s2);
                                   2    1    1
(%o37)                         [1, -, - -, - -]
                                   3    3    3
(%i38) linsolve([eq1,eq2,eq3,eq4],[a1,a2,a3,a4]);
(%o38)                                []
(%i39) 
Run Example
refl(v,a) := v - 2*a*(v.a)/(a.a);
                                           2 a (v . a)
(%o1)                    refl(v, a) := v - -----------
                                              a . a
(%i2) s1 : [1,-1,0,0,0];
(%o2)                          [1, - 1, 0, 0, 0]
(%i3) s2 : [0,1,0,0,0];
(%o3)                           [0, 1, 0, 0, 0]
(%i4) s3 : [0,0,1,-1,0];
(%o4)                          [0, 0, 1, - 1, 0]
(%i5) s4 : [0,0,0,1,-1];
(%o5)                          [0, 0, 0, 1, - 1]
(%i6) s5 : [0,0,0,0,2];
(%o6)                           [0, 0, 0, 0, 2]
(%i7) d1 : d11 * s1 + d12 * s2 + d13 * s3 + d14 * s4 + d15 * s5;
(%o7)            [d11, d12 - d11, d13, d14 - d13, 2 d15 - d14]
(%i8) e11 : d1.s1 = 1;
(%o8)                           2 d11 - d12 = 1
(%i9) e12 : d1.s2 = -1;
(%o9)                           d12 - d11 = - 1
(%i10) e13 : d1.s3 = 1;
(%o10)                          2 d13 - d14 = 1
(%i11) e14 : d1.s4 = -1;
(%o11)                    - 2 d15 + 2 d14 - d13 = - 1
(%i12) e15 : d1.s5 = 1;
(%o12)                        2 (2 d15 - d14) = 1
(%i13) [globalsolve:true];
(%o13)                              [true]
(%i14) linsolve ([e11,e12,e13,e14,e15], [d11,d12,d13,d14,d15]);
                                           1                 1
(%o14)          [d11 : 0, d12 : - 1, d13 : -, d14 : 0, d15 : -]
                                           2                 4
(%i15) d2 : d21 * s1 + d22 * s2 + d23 * s3 + d24 * s4 + d25 * s5;
(%o15)           [d21, d22 - d21, d23, d24 - d23, 2 d25 - d24]
(%i16) e21 : d2.s1 = 1;
(%o16)                          2 d21 - d22 = 1
(%i17) e22 : d2.s2 = 0;
(%o17)                           d22 - d21 = 0
(%i18) e23 : d2.s3 = -1;
(%o18)                         2 d23 - d24 = - 1
(%i19) e24 : d2.s4 = 1;
(%o19)                     - 2 d25 + 2 d24 - d23 = 1
(%i20) e25 : d2.s5 = -1;
(%o20)                       2 (2 d25 - d24) = - 1
(%i21) [globalsolve:true];
(%o21)                              [true]
(%i22) linsolve ([e21,e22,e23,e24,e25], [d21,d22,d23,d24,d25]);
                                          1                   1
(%o22)         [d21 : 1, d22 : 1, d23 : - -, d24 : 0, d25 : - -]
                                          2                   4
(%i23) d3 : d31 * s1 + d32 * s2 + d33 * s3 + d34 * s4 + d35 * s5;
(%o23)           [d31, d32 - d31, d33, d34 - d33, 2 d35 - d34]
(%i24) e31 : d3.s1 = -1;
(%o24)                         2 d31 - d32 = - 1
(%i25) e32 : d3.s2 = 1;
(%o25)                           d32 - d31 = 1
(%i26) e33 : d3.s3 = 1;
(%o26)                          2 d33 - d34 = 1
(%i27) e34 : d3.s4 = 0;
(%o27)                     - 2 d35 + 2 d34 - d33 = 0
(%i28) e35 : d3.s5 = -1;
(%o28)                       2 (2 d35 - d34) = - 1
(%i29) [globalsolve:true];
(%o29)                              [true]
(%i30) linsolve ([e31,e32,e33,e34,e35], [d31,d32,d33,d34,d35]);
                                         1                   1
(%o30)          [d31 : 0, d32 : 1, d33 : -, d34 : 0, d35 : - -]
                                         2                   4
(%i31) d4 : d41 * s1 + d42 * s2 + d43 * s3 + d44 * s4 + d45 * s5;
(%o31)           [d41, d42 - d41, d43, d44 - d43, 2 d45 - d44]
(%i32) e41 : d4.s1 = -1;
(%o32)                         2 d41 - d42 = - 1
(%i33) e42 : d4.s2 = 1;
(%o33)                           d42 - d41 = 1
(%i34) e43 : d4.s3 = -1;
(%o34)                         2 d43 - d44 = - 1
(%i35) e44 : d4.s4 = 0;
(%o35)                     - 2 d45 + 2 d44 - d43 = 0
(%i36) e45 : d4.s5 = 1;
(%o36)                        2 (2 d45 - d44) = 1
(%i37) [globalsolve:true];
(%o37)                              [true]
(%i38) linsolve ([e41,e42,e43,e44,e45], [d41,d42,d43,d44,d45]);
                                           1                 1
(%o38)          [d41 : 0, d42 : 1, d43 : - -, d44 : 0, d45 : -]
                                           2                 4
(%i39) d5 : d51 * s1 + d52 * s2 + d53 * s3 + d54 * s4 + d55 * s5;
(%o39)           [d51, d52 - d51, d53, d54 - d53, 2 d55 - d54]
(%i40) e51 : d5.s1 = -1;
(%o40)                         2 d51 - d52 = - 1
(%i41) e52 : d5.s2 = 0;
(%o41)                           d52 - d51 = 0
(%i42) e53 : d5.s3 = 0;
(%o42)                          2 d53 - d54 = 0
(%i43) e54 : d5.s4 = 1;
(%o43)                     - 2 d55 + 2 d54 - d53 = 1
(%i44) e55 : d5.s5 = -1;
(%o44)                       2 (2 d55 - d54) = - 1
(%i45) [globalsolve:true];
(%o45)                              [true]
(%i46) linsolve ([e51,e52,e53,e54,e55], [d51,d52,d53,d54,d55]);
                                            1                 1
(%o46)         [d51 : - 1, d52 : - 1, d53 : -, d54 : 1, d55 : -]
                                            2                 4
(%i47) [globalsolve: false];
(%o47)                              [false]
(%i48)  eq1 : a1*(''d1)[1] + a2*(''d2)[1] + a3*(''d3)[1] + a4*(''d4)[1] + a5*(''d5)[1];
(%o48)                              a2 - a5
(%i49) eq2 : a1*(''d1)[2] + a2*(''d2)[2] + a3*(''d3)[2] + a4*(''d4)[2] + a5*(''d5)[2];
(%o49)                           a4 + a3 - a1
(%i50) eq3 : a1*(''d1)[3] + a2*(''d2)[3] + a3*(''d3)[3] + a4*(''d4)[3] + a5*(''d5)[3];
                            a5   a4   a3   a2   a1
(%o50)                      -- - -- + -- - -- + --
                            2    2    2    2    2
(%i51) eq4 : a1*(''d1)[4] + a2*(''d2)[4] + a3*(''d3)[4] + a4*(''d4)[4] + a5*(''d5)[4];
                            a5   a4   a3   a2   a1
(%o51)                      -- + -- - -- + -- - --
                            2    2    2    2    2
(%i52) eq5 : a1*(''d1)[5] + a2*(''d2)[5] + a3*(''d3)[5] + a4*(''d4)[5] + a5*(''d5)[5];
                             a5   a4   a3   a2   a1
(%o52)                     - -- + -- - -- - -- + --
                             2    2    2    2    2
(%i53) color : ''d4;
                                        1  1  1
(%o53)                         [0, 1, - -, -, -]
                                        2  2  2
(%i54) vect : refl(color,s1);
                                        1  1  1
(%o54)                         [1, 0, - -, -, -]
                                        2  2  2
(%i55) linsolve([eq1=vect[1],eq2=vect[2],eq3=vect[3],eq4=vect[4],eq5=vect[5]],[a1,a2,a3,a4,a5]);
(%o55)             [a1 = 1, a2 = 1, a3 = 0, a4 = 1, a5 = 0]
(%i56) 

Related Help

Help for Color