Some improvements to matrix

I found a little some improvements.

## before

Matrix.empty.inverse
=> NoMethodError: undefined method `size' for nil:NilClass

## after

Matrix.empty.inverse
=> RuntimeError: inverse of empty matrix is not defined


And, add test for raising ErrDimensionMismatch in Matrix#inverse.