writing two functions with usage of cache

set and get matrices inverse and calculate inverse(if not already done)