matrix multiplication for dave gregg lad