Since the Matrix class is a template, I'll assume the functions are too. If this is the case, the functions must be implemented in the same translation unit in which they are called. This can be easily achieved by implementing them in the header files in which they are declared.