Declared and implemented matrix multiplication in O(N^3) time complexity.