Matrix multiplication of symmetric matrices
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi everyone,
I'm trying to multiply a symmetric matrix of a predefined format (14x14) with another symmetric matrix of the same format.
The easiest case to show here would be to multiply the matrix with itself.
I know, the most convenient solution might be the matrix multiplication in e.g. python, but given that the python tool or other embedded code is not an option, does anyone have a good solution for that?
I added a sample matrix below, but you could just take any matrix there is.
Thanks in advance!
Solved! Go to Solution.
- Labels:
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @JohannesR,
Currently its not a feature but there is an idea/feature request in the community if you want to support it Support Basic Linear Algebra (Vectors and Matrices... - Alteryx Community. To achieve this you'll need to create an iterative or batch macro to loop through each column/row, couldn't find anyone on the gallery who has done this yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for your quick reply to both of you!
@DataNath Unfortunately, that's just not the correct result of the multiplication.
I would need the result as follows: Cell 1,1 = (A1,1 * A1,1)+(A1,2 * A2,1)+(A1,3 * A3,1)+...
The attached matrix is the result I'm actually looking for...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm genuinely impressed by the solution. Works exactly as wished and when compared to python I only get differences from the 16th decimal point onwards which might be due to the floating point exception handled differently in python and in alteryx itself (I guess... Link to FPE ).
But I checked it against the Python solution and attached the workflow.
Thanks for your solution @NeilR!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@JohannesR my pleasure that was fun. Out of curiosity, what are you up to with matrix multiplication? [Gallery link.]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I need this solution in the context of an expected credit loss calculation for a client in the banking sector, where you need to multiply the transition matrices in order to estimate the probability of default in a given number of years...
Unfortunately my client uses relatively slow machines which apparently struggle with the python script :D
