Skip to content

Instantly share code, notes, and snippets.

@jjl
Created October 3, 2013 20:59
Show Gist options
  • Save jjl/6817050 to your computer and use it in GitHub Desktop.
Save jjl/6817050 to your computer and use it in GitHub Desktop.
Linear Algebra. Or the little bit I need to know for something I've been working on.
-- Multiply a Row Vector by a Column Vector
multPerpendicularVecs = zipWith (*)
-- Multiply 2 Row Vectors (ugh, that's not supposed to happen), or 2x Col Vecs
multParallelVecs a b = fmap (* (sum a)) b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment