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!
Transpose[]. – J. M.'s missing motivation May 23 '15 at 16:48MatrixFormto carry out further calculations (see: Why does MatrixForm affect calculations?). This is the reason why yourInversewas returned unevaluated. If you had triedInverse[m]instead, you would have seenMatrix {{1,0,-1},{3,2,1},{7,6,5}} is singular.which would have been a lot more informative to you. – MarcoB May 23 '15 at 17:09n = 3
m = Array[f, {n, n}] |
MatrixForm[m] |
Transpose[m] // MatrixForm |
MatrixForm[UpperTriangularize[m]] |`
– Andrej May 24 '15 at 16:49