Post Reply 
Left matrix division
12-16-2018, 10:45 AM
Post: #1
Left matrix division
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-
Find all posts by this user
Quote this message in a reply
12-16-2018, 09:44 PM
Post: #2
RE: Left matrix division
Matlab A*x = B → x = A\B
HP Prime A*x = B → x = B/A

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
12-17-2018, 01:49 PM
Post: #3
RE: Left matrix division
(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.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
12-17-2018, 01:54 PM (This post was last modified: 12-17-2018 01:56 PM by compsystems.)
Post: #4
RE: Left matrix division
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"]
Find all posts by this user
Quote this message in a reply
12-17-2018, 04:11 PM
Post: #5
RE: Left matrix division
(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
Find all posts by this user
Quote this message in a reply
12-17-2018, 10:10 PM
Post: #6
RE: Left matrix division
(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

Viga C | TD | FB
Visit this user's website Find all posts by this user
Quote this message in a reply
12-18-2018, 06:37 PM
Post: #7
RE: Left matrix division
set of algorithm talking about backslash: Tim Davis
https://www.youtube.com/watch?v=5NpBTUSQac4
Find all posts by this user
Quote this message in a reply
12-18-2018, 07:53 PM
Post: #8
RE: Left matrix division
(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
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)