Matrix multiplication compatibility check.
Added shells for other matrix methods.