[racket] Computing dot product via racket math library

From: Dmitry Cherkassov (dcherkassov at gmail.com)
Date: Thu Oct 24 10:59:15 EDT 2013

I've tried using racket math library to compute dot product of two
vectors, but haven't found the very function to compute it.

What i've found so far is to use matrix* function, but two drawbacks:
    1. I have to transpose the right multiple (extra overhead)
    2. It yields single-element matrix:
        > (matrix* (matrix ([1 2])) (matrix ([2] [1])))
           (array #[#[4]])

        So i need to extract it (for example calculating the determinant :)

So the questions are:
A. Is there dot product function available?
B. Is there any reason that matrix* yields single-element matrix (2)


Thanks
-- 
With best regards,
Dmitry

Posted on the users mailing list.