Skip to content

Some Wrong When Doing Matrix Inverse #4198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rtoy opened this issue Jul 10, 2024 · 2 comments
Open

Some Wrong When Doing Matrix Inverse #4198

rtoy opened this issue Jul 10, 2024 · 2 comments

Comments

@rtoy
Copy link
Owner

rtoy commented Jul 10, 2024

Imported from SourceForge on 2024-07-09 19:42:11
Created by luca010 on 2021-10-15 15:49:39
Original: https://sourceforge.net/p/maxima/bugs/3878


A:matrix(
[1/sqrt(2),-1/(3sqrt(2)),2/3],
[1/sqrt(2),1/(3
sqrt(2)),-2/3],
[0,4/(3*sqrt(2)),1/3]
);
B:invert(A);

I got:
matrix(
[(2^(5/2)/9+1/(9sqrt(2)))/((2^(5/2)/9+1/(9sqrt(2)))/sqrt(2)+1/2), (2^(5/2)/9+1/(9sqrt(2)))/((2^(5/2)/9+1/(9sqrt(2)))/sqrt(2)+1/2), 0],
[-1/(3sqrt(2)((2^(5/2)/9+1/(9sqrt(2)))/sqrt(2)+1/2)), 1/(3sqrt(2)((2^(5/2)/9+1/(9sqrt(2)))/sqrt(2)+1/2)), 2^(3/2)/(3*((2^(5/2)/9+1/(9sqrt(2)))/sqrt(2)+1/2))],
[2/(3
((2^(5/2)/9+1/(9sqrt(2)))/sqrt(2)+1/2)), -2/(3((2^(5/2)/9+1/(9sqrt(2)))/sqrt(2)+1/2)), 1/(3((2^(5/2)/9+1/(9*sqrt(2)))/sqrt(2)+1/2))]
)
That' wrong!

Attachments:

@rtoy
Copy link
Owner Author

rtoy commented Jul 10, 2024

Imported from SourceForge on 2024-07-09 19:42:13
Created by macrakis on 2021-10-15 16:18:44
Original: https://sourceforge.net/p/maxima/bugs/3878/#4b05


The result is correct, though unsimplified. This behavior is documented:

'invert' does not apply any simplifications to the elements of the
inverse apart from the default arithmetic simplifications.
'ratsimp' and 'expand' can apply additional simplifications.

You can simplify it into a more familar form using ratsimp, expand, factor, etc.

@rtoy
Copy link
Owner Author

rtoy commented Jul 10, 2024

Imported from SourceForge on 2024-07-09 19:42:16
Created by macrakis on 2021-10-15 16:19:04
Original: https://sourceforge.net/p/maxima/bugs/3878/#141a


  • status: open --> not-a-bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant