Matrix functions for JavaScript. For my own education.