HN Distilled

Essential insights from Hacker News discussions

Cracovians: The Twisted Twins of Matrices

Difficulty Understanding the Definition of Cracovian Multiplication

Several users expressed confusion and difficulty understanding the provided definition and example of Cracovian multiplication. The original explanation was considered ambiguous and the example was found to be incorrect or misleading.

  • "Am I the only one for whom this crucial explanation didn’t click? Admittedly, I might be stupid." - kubb
  • "You're not the only one. That “explanation” is just really bad." - tempodox
  • "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." - tgv
  • "No, I think it is too ambiguous to be useful. The example wasn't helpful either, I think they needed to perform the individual calculations for clarity." - burnished
  • "Agreed -- "is a term of the sum" is such an inverted way to look at it." - andrewla
  • "Even in Polish, this comes out Greek to me." - pomian
  • "I mean, it makes some sort of visual sense, but can't grasp the results from the matrices shown." - pomian

Incorrect or Hallucinated Example

Multiple users pointed out the example provided in the original post was incorrect, with some sospections it had been generated or altered by an LLM. The author later confirmed the example was a hallucination from a translation done by Gemini.

  • "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." - AdamH12113
  • "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..." - tgv
  • "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!)" - andrewla
  • "Thanks for the feedback, everyone. I pasted my Polish text into Gemini to translate it into English. Gemini hallucinated the translation of this example. Now it should be OK." - mci

Cracovians as Transposed Matrices and Tensor Operations

Several users debated the nature of Cracovians, with differing views on whether they are simply transposed matrices or a specific type of tensor operation.

  • "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." - adastra22
  • "It is a tensor of rank two with a special binary operation on tensors. These objects aren't matrices in the mathematical sense any more than convolution kernels aren't." - noosphr
  • "A tensor of rank two is the same thing as a matrix…" - adastra22
  • "Matrices come with the matrix product defined over them. This is one of four possible closed first order tensor contractions for an order two tensor, viz. AijBik AijBki AijBjk AijBkj. Only the third is applicable to matrices, all other contractions only work for general tensors without transposition." - noosphr

Limited Practical Advantages of Cracovians

The consensus among users, including the author, was that Cracovians likely offer no significant practical advantages over standard matrix operations, especially concerning performance on modern computers, with one user suggesting the only advantage might be memory layout.

  • "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?" - gnulinux
  • "Author here. There are no practical advantages, as far as I know. Not even faster multiplication on today's computers." - mci
  • "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." - hansvm
  • "for number crunching there is no reason to prefer then to cracovians, or vice versa, without knowing what the underlying memory layout is in hardware." - noosphr

General Lack of Interest in Cracovians

Some users (especially a mathematician who has taught Linear Algebra) expressed disinterest in Cracovians, viewing them as a minor variation of standard matrix operations without significant mathematical or practical importance and suggesting it's better to move on to more fruitful avenues of exploration.

  • "I'm a mathematician who taught linear algebra for decades. I love Einstein notation. I don't find Cracovians interesting at all." - Syzygies
  • "I wouldn't stall too long thinking about Cracovians, as amusing a skim as the post provided." - Syzygies