Matrix operation source code