HP Forums

Full Version: Left matrix division
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a shortcut for left matrix division, similar to the Matlab backslash (\) symbol
(or can this symbol be considered for a future enhancement)?

-Dale-
Matlab A*x = B → x = A\B
HP Prime A*x = B → x = B/A
(12-16-2018 09:44 PM)Carlos295pz Wrote: [ -> ]Matlab A*x = B → x = A\B
HP Prime A*x = B → x = B/A

Matrix multiplication is noncommutative, so you can't just reverse the positions of A and B like that.

For square matrices A and B (of the same size), Matlab's A\B is roughly equivalent to A⁻¹B, and A/B is roughly equivalent to AB⁻¹ (like on HP Prime), although Matlab supports left and right division of non-square matrices too.
can use the \ symbol (next firmware) for other functions, such as integer division, set
difference

5\4 [↵] 1

\ Synonym of minus infix operator
set[ "b", "a", "c", "a" ] minus set[ "a", "d" ] [↵] set["b","c"]
set[ "b", "a", "c", "a" ] \ set[ "a", "d" ] [↵] set["b","c"]
(12-17-2018 01:49 PM)ijabbott Wrote: [ -> ]
(12-16-2018 09:44 PM)Carlos295pz Wrote: [ -> ]Matlab A*x = B → x = A\B
HP Prime A*x = B → x = B/A

Matrix multiplication is noncommutative, so you can't just reverse the positions of A and B like that.

For square matrices A and B (of the same size), Matlab's A\B is roughly equivalent to A⁻¹B, and A/B is roughly equivalent to AB⁻¹ (like on HP Prime), although Matlab supports left and right division of non-square matrices too.

I was trying to inspire enthusiasm for the use of the backslash symbol as a short hand for this purpose. While not directly on a key face, it is available via the [Chars] menu. My track record for successful suggestions, hasn't been very productive, so I doubt this will be any different, but, with enough merit, and interest, one never knows!Smile
(12-17-2018 01:49 PM)ijabbott Wrote: [ -> ]Matrix multiplication is noncommutative, so you can't just reverse the positions of A and B like that.

For square matrices A and B (of the same size), Matlab's A\B is roughly equivalent to A⁻¹B, and A/B is roughly equivalent to AB⁻¹ (like on HP Prime), although Matlab supports left and right division of non-square matrices too.

It is the evolution of mathematics xD
set of algorithm talking about backslash: Tim Davis
https://www.youtube.com/watch?v=5NpBTUSQac4
(12-17-2018 10:10 PM)Carlos295pz Wrote: [ -> ]...It is the evolution of mathematics xD
It is not evolution
computationally we can overload the operators, for example *, can mean dot product between vectors, Cartesian product, but mathematically affects the definitions
Reference URL's