Completed functions to cache the inverse of a matrix

Signed-off-by: rbscholtus <barend.scholtus@gmail.com>