Cracovians: The Twisted Twins of Matrices
19 comments
·June 20, 2025kubb
andrewla
Agreed -- "is a term of the sum" is such an inverted way to look at it.
Better I think would be to say "the result in column i and row j is the sum of product of elements in column i of the left cracovian and column j of the right cracovian".
And even by this definition the example given doesn't seem to track (and the strangeness of sometimes saying "+" and sometimes not, and having both "0" and "-0" in the example is bananas!):
{ 3 2 } { 1 -4 } = { 5 -2 }
{ -1 0 } { -2 3 } = { 0 2 }
3 * 1 + -1 * -2 == 5 -- check
3 * -4 + -1 * 3 == -15 -- what?
2 * 1 + 0 * -2 == 2 (okay, but shouldn't this be in the lower left, column 1 dotted with column 2?)
2 * -4 + 0 * 3 = -8 (now I'm really missing something)
mci
I took the liberty to replace my awkward wording with your "the result in column i and row j is the sum of product of elements in column i of the left cracovian and column j of the right cracovian". Hope you don't mind. Thanks!
AdamH12113
The example is simply wrong, according to other sources. This along with the inconsistent formatting makes me wonder if it was written by an LLM. It's a shame; this seems like an interesting topic.
tempodox
You're not the only one. That “explanation” is just really bad.
tgv
It's the crucial part, and even with the example, I couldn't understand it. Like I can't understand why the second column in the first matrix doesn't have signs. Or why the 0 in the result matrix is negative.
But in another link I found that it's column by column multiplication. So A × B = C, then C[i][j] = sum(A[k][i] * B[k][j]). Unfortunately, the example doesn't match that definition...
fxj
I didnt get the explanation of the multiplication. After reading the wikipedia article it made mode sense:
https://en.wikipedia.org/wiki/Cracovian
The Cracovian product of two matrices, say A and B, is defined by
A ∧ B = BT A,
where BT and A are assumed compatible for the common (Cayley) type of matrix multiplication and BT is the transpose of B.
Since (AB)T = BT AT, the products (A ∧ B) ∧ C and A ∧ (B ∧ C) will generally be different; thus, Cracovian multiplication is non-associative.
A good reference how to use them and why they are useful is here (pdf):
https://archive.computerhistory.org/resources/access/text/20...
adastra22
As far as I can tell I don’t think it is correct to say that this isn’t a matrix. B is just written down in transposed form. Whether that makes the math more or less clear is something you can argue for or against, but it’s the same math and it is confusing to call it something else.
gnulinux
I guess I'm skeptical of using a non-associative algebra instead of something that can trivially be made into a ring or field (i.e. matrix algebra). What advantages does this give us?
mci
Author here. There are no practical advantages, as far as I know. Not even faster multiplication on today's computers.
hansvm
One thing that comes up in the sort of code ML I like to write is a careful attention to memory layout. Cracovians, defined according to some sibling comment as (B^T)A, make that a little more natural, since B and A can now have the same layout. I haven't used them though, so I don't have a good sense of whether that's more or less painful than other approaches.
bravesoul2
Shouldn't be the same on a computer right? The change is in human perception not actually what hapens when multiplying.
TimorousBestie
What an interesting little nook of matrix analysis history! Thanks for sharing. :)
esafak
Missed a chance to call it the twisted sister!
> However, the multiplication of a cracovian by another cracovian is defined differently: the result of multiplying an element from column i of the left cracovian by an element from column j of the right cracovian is a term of the sum in column i and row j of the result.
Am I the only one for whom this crucial explanation didn’t click? Admittedly, I might be stupid.
Wikipedia is a bit more understandable: „The Cracovian product of two matrices, say A and B, is defined by A ∧ B = (B^T)A