Some improvements to matrix

I found some improvements.

### before

```ruby:before
Matrix.diagonal( )
=> NoMethodError: undefined method `size' for nil:NilClass

Matrix.scalar(0, 1)
=> NoMethodError: undefined method `size' for nil:NilClass

Matrix.empty.inverse
=> NoMethodError: undefined method `size' for nil:NilClass
```

### after

```ruby:after
Matrix.diagonal( )
=> Matrix.empty(0, 0)

Matrix.scalar(0, 1)
=> Matrix.empty(0, 0)

 Matrix.empty.inverse
=> Matrix.empty(0, 0)
```

And, add test for raising ErrDimensionMismatch in Matrix#inverse.