More matrix ops and associated tests.