HP Forums
Left matrix division - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Left matrix division (/thread-11959.html)



Left matrix division - DrD - 12-16-2018 10:45 AM

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-


RE: Left matrix division - Carlos295pz - 12-16-2018 09:44 PM

Matlab A*x = B → x = A\B
HP Prime A*x = B → x = B/A


RE: Left matrix division - ijabbott - 12-17-2018 01:49 PM

(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.


RE: Left matrix division - compsystems - 12-17-2018 01:54 PM

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"]


RE: Left matrix division - DrD - 12-17-2018 04:11 PM

(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


RE: Left matrix division - Carlos295pz - 12-17-2018 10:10 PM

(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


RE: Left matrix division - toshk - 12-18-2018 06:37 PM

set of algorithm talking about backslash: Tim Davis
https://www.youtube.com/watch?v=5NpBTUSQac4


RE: Left matrix division - compsystems - 12-18-2018 07:53 PM

(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