use matrix.js to provide math facilities.