Matrix method

Normal method
using Matrix method
using Matrix method.