matrix inverse
add the ability to handle jagged data without copying