Finish matrix input and output and Add matrix multiplication by matrix