I have noticed that if A is a NxN matrix and it has the inverse matrix. But what the inv() and pinv() function output is different. - My environment is Win7x64 SP1, Matlab
Floating point arithmetic has a certain precision, you can not rely on equality. To avoid such errors, you could try to work with the symbolic toolbox of matlab.
Very simple line of code in octave to demonstrate the problems:
>>> (1/48)*48==(1/49)*49
ans = 0
>>> (1/48)*48-(1/49)*49
ans = 1.1102e-16
>>>