Implement functions to create matrix that will solve and cache it's results