Closed mohamedelshorbagy closed 6 years ago
When the matrix is not invertible it throws an error:
But we only need a message telling the user that the matrix is just not invertible and division can't be done, right? Now that's easy
As for the multiplication, it's valid: 3 x 1 * 1 x 3, should return a 3 x 3 matrix. So the problem here is different!
Yes , That's Right firstly finish the Division then finish the Multiplication Problem
Handled diving by a non square matrix here in the second attempt:
Now the first attempt is an error thrown from mul() function because I'm multiplying: 1 x 3 * 2 x 3
When using operation like * or / if matrices is not square it terminates all the program and I just want to have a little message telling me the operation can't be done