Q:

Creating Matrix,Inverted and Upper Triangulate inside Module

I was trying to fit this into a module but I didn't have any luck. And for some reason it won't Inverse the Matrix. 
Here's the code:
Input:
f[x_, y_] = 2^x - y
n = 3
m = Array[f, {n, n}]
k = MatrixForm[m]
Inverse[k]
MatrixForm[UpperTriangularize[m]]

Output:

And here is how the output should look like :

Is it possible to put this into a Module function?
Please help!

A:

As pointed out by MarcoB in the comments, one shouldn't use MatrixForm for calculations (check the question he referred to). As he suggested, this is the real reason Inverse doesn't evaluate.
Also, in this case the matrix m is singular.
You can easily check that by MatrixRank[m] which yields 2, and also by checking Det[m]==0.
How to proceed with m being singular highly depends on what you are trying to do next with Inverse[m].

