Is it really your intention to have the SolveAxb function be a sub-template of the templated class Matrix, or do you just want a single instance of SolveAbx for every template-instance of the class Matrix with the same type? At the moment, the Matrix class and the SolveAxb function have two different template parameters, only they are named the same so the one on the SolveAxb function shadows the one on the Matrix class.
If the latter, drop the template on the function declaration.
Drop the "template <class T>" at the method declaration.
What you are basically doing is defining a template method inside a template class. If that is intended (which by the loook of your code isn't the case), the template parameter at the method declaration needs to have a different name than the template parameter of the class declaration.