Given a matrix A and a matrix B, is A the inverse of B?
>>A=[2,4;3,5];
>>B=[-2.5,2;1.5,-1];
>>isInverse(A,B)
ans = 1
Solution Stats
Problem Comments
12 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers1391
Suggested Problems
-
Remove the small words from a list of words.
1565 Solvers
-
Project Euler: Problem 8, Find largest product in a large string of numbers
1324 Solvers
-
Sum of first n terms of a harmonic progression
517 Solvers
-
Given a window, how many subsets of a vector sum positive
873 Solvers
-
1320 Solvers
More from this Author16
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Need to improve the test suites.
Test of [1 1;1 1] for x and y would break current best solution
Test suite not proper
just y=1 can pass
Test suite has been improved
Inputs should be changed to be A and B instead of x and y
i think there id some error in test case 1,2
Bit tricky
If you are having issues with this and your solution seems correct, it is likely a computer precision issue.
make sure to round the inverse of B, it's the reason 1&2 test cases are incorrect.
i tried all the things but I am not able to solve this question can anybody help me with this question
@Sayali Recall that if A is the inverse B, then AB = BA = I, where I is an identity matrix of appropriate dimensions. Also, brush up on your basic MATLAB, e.g. syntax and built-in functions. Good luck!