### Related

a : covect ([1, 2...

b : covect ([2, 1...

Calculate

a:covect([1, 2]);

Calculate

a:covect([5, 30, 6]);

Calculate

a:covect([5, 30, 6]);

Calculate

##### dotproduct-expand-matrix

f:matrix([f11,f12,f13...

m:matrix([m1],[m2],[m...

r:expand(dotproduct(f...

Calculate

##### dotproduct-expand-matrix

f:matrix([f11,f12,f13...

m:matrix([m1],[m2],[m...

r:dotproduct(f.m,f.m);

Calculate

a:covect([5*m/s, 30*m...

Calculate

a:covect([1, 2]);

Calculate

a:covect([5, 30, 6]);

Calculate

##### dotproduct-expand-matrix

f:matrix([f11,f12,f13...

m:matrix([m1],[m2],[m...

r:expand(dotproduct(f...

Calculate

### dotproduct

Run Example
```(%i1)load(unit);
*******************************************************************
*                       Units version 0.50                        *
*          Definitions based on the NIST Reference on             *
*              Constants, Units, and Uncertainty                  *
*       Conversion factors from various sources including         *
*                   NIST and the GNU units package                *
*******************************************************************

Redefining necessary functions...
Initializing unit arrays...
Done.
(%o1)        /usr/share/maxima/5.21.1/share/contrib/unit/unit.mac
(%o2)      /usr/share/maxima/5.21.1/share/vector/vector_rebuild.mac
(%i3) a:covect([5, 30, 6]);
[ 5  ]
[    ]
(%o3)                               [ 30 ]
[    ]
[ 6  ]
(%i4) b : dotproduct(a,a), vector_simp;
(%o4)                                 961
(%i5) e : m/s*m/s;
2
m
(%o5)                                 --
2
s
(%i6) ```
Run Example
```p: matrix([x], [y]);
[ x ]
(%o1)                                [   ]
[ y ]
(%i2) p_0: matrix([x0], [y0]);
[ x0 ]
(%o2)                               [    ]
[ y0 ]
(%i3) p_1: matrix([x1], [y1]);
[ x1 ]
(%o3)                               [    ]
[ y1 ]
(%i4) p_2: matrix([x2], [y2]);
[ x2 ]
(%o4)                               [    ]
[ y2 ]
(%i5) l_1: (1 - t) * p_0 + t * p_1;
[ t x1 + (1 - t) x0 ]
(%o5)                        [                   ]
[ t y1 + (1 - t) y0 ]
(%i6) l_2: (1 - t) * p_1 + t * p_2;
[ t x2 + (1 - t) x1 ]
(%o6)                        [                   ]
[ t y2 + (1 - t) y1 ]
(%i7) b: (1 - t) * l_1 + t * l_2;
[ t (t x2 + (1 - t) x1) + (1 - t) (t x1 + (1 - t) x0) ]
(%o7)       [                                                     ]
[ t (t y2 + (1 - t) y1) + (1 - t) (t y1 + (1 - t) y0) ]
(%i8) b_prime: diff(b, t);
(%o8) matrix([t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1
- (1 - t) x0], [t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1 + (1 - t) y1
- (1 - t) y0])
(%i9) norm_b_prime: b_prime / sqrt(b_prime . b_prime);
(%o9) matrix([(t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1
- (1 - t) x0)/sqrt(expt(t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1
+ (1 - t) y1 - (1 - t) y0, 2)
2
+ (t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0) )],
[(t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1 + (1 - t) y1 - (1 - t) y0)
/sqrt(expt(t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1 + (1 - t) y1
- (1 - t) y0, 2)
2
+ (t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0) )])
(%i10) dotproduct(norm_b_prime, norm_b_prime);
(%o10)
2
(t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1 + (1 - t) y1 - (1 - t) y0)
2
/((t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1 + (1 - t) y1 - (1 - t) y0)
2
+ (t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0) )
2
+ (t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0)
2
/((t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1 + (1 - t) y1 - (1 - t) y0)
2
+ (t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0) )
(%i11) db_norm_dt: diff(norm_b_prime, t);
(%o11) matrix([(2 x2 - 4 x1 + 2 x0)/sqrt(expt(t (y2 - y1) + t y2
+ (1 - t) (y1 - y0) - t y1 + (1 - t) y1 - (1 - t) y0, 2)
2
+ (t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0) )
- ((t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0)
(2 (2 y2 - 4 y1 + 2 y0) (t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1
+ (1 - t) y1 - (1 - t) y0) + 2 (2 x2 - 4 x1 + 2 x0)
(t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0)))
2                                                                            2 3/2
/(2 ((t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1 + (1 - t) y1 - (1 - t) y0)  + (t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0) )   )],
[(2 y2 - 4 y1 + 2 y0)/sqrt(expt(t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1
+ (1 - t) y1 - (1 - t) y0, 2)
2
+ (t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0) )
- ((t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1 + (1 - t) y1 - (1 - t) y0)
(2 (2 y2 - 4 y1 + 2 y0) (t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1
+ (1 - t) y1 - (1 - t) y0) + 2 (2 x2 - 4 x1 + 2 x0)
(t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0)))
2                                                                            2 3/2
/(2 ((t (y2 - y1) + t y2 + (1 - t) (y1 - y0) - t y1 + (1 - t) y1 - (1 - t) y0)  + (t (x2 - x1) + t x2 + (1 - t) (x1 - x0) - t x1 + (1 - t) x1 - (1 - t) x0) )   )])
(%i12) ```
Run Example
```f:matrix([f11,f12,f13],[f21,f22,f23],[f31,f32,f33]);
[ f11  f12  f13 ]
[               ]
(%o1)                          [ f21  f22  f23 ]
[               ]
[ f31  f32  f33 ]
(%i2) m:matrix([m1],[m2],[m3]);
[ m1 ]
[    ]
(%o2)                               [ m2 ]
[    ]
[ m3 ]
(%i3) r:expand(dotproduct(f.m,f.m));
2   2      2   2      2   2
(%o3) f33  m3  + f23  m3  + f13  m3  + 2 f32 f33 m2 m3 + 2 f22 f23 m2 m3
+ 2 f12 f13 m2 m3 + 2 f31 f33 m1 m3 + 2 f21 f23 m1 m3 + 2 f11 f13 m1 m3
2   2      2   2      2   2
+ f32  m2  + f22  m2  + f12  m2  + 2 f31 f32 m1 m2 + 2 f21 f22 m1 m2
2   2      2   2      2   2
+ 2 f11 f12 m1 m2 + f31  m1  + f21  m1  + f11  m1
(%i4) ```

### Related Help

Help for Dotproduct