Talk:Matrix multiplication

message: If this article is to be about binary operations on two matrices to form a third, then scalar multiplication of matrices by a number should be excluded. Shall we transfer the section in this article to that article? The "see also" section of this article can link to the scalar multiplication article. It would prevent straining the lead between scalar multiplication and binary operations.
It could also make sense to have this article concentrate on the usual definition of the matrix product, with links to the other products (Hadamard product (matrices), Kronecker product etc.), and the Frobenius product split off to its own article (Frobenius product (matrices)) to be expanded later. M∧Ŝc2ħεИτlk 08:18, 29 October 2016 (UTC)
replies: text: I totally agree with restricting this article to the product of two matrices to form a third.  Just because when one refers to "multiplication of a matrix/matrices", it is not clear which multiplication operation is being referred to does not mean that a single article should try to cover each of the myriad possibilities, as per WP:NAD.  —Quondum 15:32, 2 November 2016 (UTC)
replies: text: Moved the scalar multiplication content over. It remains to decide if other matrix multiplications stay in this article or are removed altogether. M∧Ŝc2ħεИτlk 09:55, 3 November 2016 (UTC)
replies: text: IMO the "other" matrix multiplications should only be mentioned in "See also" section.  The Frobenius inner product does not seem to have an article of its own yet, but the material should ideally not be lost.  The last two paragraphs of the lead do not belong there (strained, as you say, and conventions for an article should be explicated in the body, not the lead).  However, there seems to be a tendency to duplicate material in many articles (which I dislike if there is a clear place it "belongs"), so there may be resistance.  —Quondum 15:49, 3 November 2016 (UTC)

text: Which is as it should be.    Nice to see articles being shaped into what they should be.  —Quondum 15:32, 6 November 2016 (UTC)
thread_title:  Scope? 

message: A company sells cement, chalk and plaster in bags weighing 25, 10, and 5 kg respectively. Four construction firms Arson, Build, Construct and Demolish, buy regularly these products from this company. The number of bags the clients buy in a specific year may be arranged in a 4×3-matrix A, with columns for the products and rows representing the clients:
:A=\begin{bmatrix}14&9&3\\2&11&15\\0&12&17\\5&2&3\end{bmatrix}
We see for instance that A_{32}=12, indicating that client Construct has bought 12 bags of chalk that year.
A bag of cement costs GBP 12, a bag of chalk GBP 9 and a bag of plaster GBP 8. The 3×2-matrix B shows prices and weights of the three products:
:B=\begin{bmatrix}12&25\\9&10\\8&5\end{bmatrix}
To find the total amount firm Arson has spent that year, we calculate:
:14\times 12 + 9\times 9 + 3\times 8 =273,
in which we recognize the first row  of the matrix A (Arson) and the first column of the matrix B (prices).
The total weight of the product bought by Arson is calculated in a similar manner:
:14\times 25 + 9\times 10 + 3\times 5 =455,
in which we now recognize the first row  of the matrix A (Arson) and the second column of the matrix B (weight).
We can make similar calculations for the other clients. Together they form the matrix AB as the matrix product of the matrices A and B:
:AB=\begin{bmatrix}14&9&3\\2&11&15\\0&12&17\\5&2&3\end{bmatrix}
\begin{bmatrix}12&25\\9&10\\8&5\end{bmatrix}=
\begin{bmatrix}273&455\\243&235\\244&205\\102&160\end{bmatrix}
Nijdam (talk) 11:55, 24 December 2016 (UTC)
replies: text: Years ago there was probably an example like this. I prefer the generalized examples in Matrix multiplication#Examples of matrix products, but if anyone wants a real-life example then it could be added. M∧Ŝc2ħεИτlk 10:03, 24 December 2016 (UTC)
thread_title: Example

message: Use it if you think it makes the article better--Guy vandegrift (talk) 18:42, 8 February 2017 (UTC)
replies: text: Note also that the muscle memory of your left-right hands reminds you that the left and right indices refer to first and second index respectively: rows and columns (from left-to-right).  Advice offered by someone who might have a marginal case of dyslexia --Guy vandegrift (talk) 16:12, 10 February 2017 (UTC)
thread_title:  I don't often edit wikipedia articles, so it's your call whether you want to insert this figure: 

message: Not only are there two illustrations on how to do matrix multiplication, the first one is a mess of arrows (and the image caption is no better), the second illustration is slightly better, but I had no idea that the two circles represent the dot products.
If you do a google image search, you'll find far better illustrations, such as this one: 
https://i1.wp.com/www.javatechblog.com/wp-content/uploads/2016/06/matrix-multiplication.jpg?resize=583%2C565
or that one:
https://www.mathsisfun.com/algebra/images/matrix-multiply-a.svg
The excessive use of symbols is not helping either (summations over indicides) is not helping either. 
Probably, the whole definition can be condensed to one picture and maybe a short reminder of the dot product.  — Preceding unsigned comment added by 185.81.138.29 (talk) 17:23, 6 December 2017 (UTC)
replies: text: I agree that the first figure is confusing. If one follows the arrows, one should believe that the sequence of operations is  I'll remove this figure. D.Lazard (talk) 14:58, 20 February 2018 (UTC)
thread_title:  Incomprehensible Illustrations  

message: I have rewritten the whole article. For this, I have done some choices, generally explained in edit summaries. This rewriting is almost finished. However, a subsection  of  is still needed, and I'll probably write it soon. In fact, it is now well known that the complexities of most problems of linear algebra are better expressed in terms of matrix-multiplication complexity, or in terms of the exponent \omega of this complexity. It is thus useful to include that in WP, and presently, this article seems the best place.
IMHO, the rating of this article should be upgraded to "class = B". Being the author of the last major revision, I cannot upgrade it myself. So, your opinion is welcome, and if there is a consensus, for that, please, upgrade the rating. D.Lazard (talk) 18:14, 27 February 2018 (UTC)
replies: text: Done. Thanks for your work on the article! Jakob.scholbach (talk) 20:39, 27 February 2018 (UTC)
thread_title:  Math rating: Class = B ? 

message: Can I suggest people look at the German version (<translate?hl=en&sl=auto&tl=en&u=https://de.wikipedia.org/wiki/Matrizenmultiplikation via Google translate) of this article and compare it to the English one?
I think the German version is a lot easier for someone unfamiliar with the topic to follow.  I can see severel reasons.
Firstly, the German version is more inline with our MOS:MATH, which states:
:"A general approach to writing an article is to start simple and then move towards more abstract and technical subjects later on in the article."
:"The lead should, as much as possible, be accessible to a general reader, so specialized terminology and symbols should be avoided."
:"Most mathematical ideas are capable of some form of generalization. If appropriate, such material can be put under a "Generalizations" section. As an example, multiplication of the rational numbers can be generalized to other fields."
This is not what has happend in this article, and I can see the history of why that is in some of the threads above.  People coming to this talk page to insist some generalisation or other is mentioned in the first sentence.  We end up with a first sentence that says
:"In mathematics, matrix multiplication or matrix product is a binary operation that produces a matrix from two matrices with entries in a field, or, more generally, in a ring or even a semiring."
This is a really bad approach because it makes people think that they need to understand terms like field and semiring to understand matrix multiplication.
Relatedly, the German article talks about the sorts of things that are useful for a beginer to know, like "In order to be able to multiply two matrices, the number of columns of the first matrix must match the number of rows of the second matrix."  It says this earlier and without the need to say "if  is an  matrix" etc.
Finally, the German article
*makes much better use of images, including having one at the top of the article
*devotes less space in the lead to compuational complexity
*briefly mentions the history of matrix multiplication (something else recommended in MOS:MATH).
I would be happy to make some changes in line with the above, but I thought I should discuss it here first, given the previous conversations where people argue to include further generalisations in the lead.
Yaris678 (talk) 15:45, 13 December 2019 (UTC)
replies: text: (following the note left at WT:WPM) Everything you say sounds very reasonable.  The inclusion of jargon like "semiring" in the first sentence is particularly indefensible.  --JBL (talk) 22:24, 15 December 2019 (UTC)
replies: text: Thanks JBL.  I have now made a change addressing the above.  There are probably a few other pointers we cold take from the German article, like the use of further illustrations of the same format elsewhere in the article, but that will require further thought.  Yaris678 (talk) 14:43, 18 December 2019 (UTC)
replies: text: I agree with removing semirings and such from the lead, especially the very first sentence. Another thing that should be improved is the fact that the lead does in no way summarize the article (as it should). Jakob.scholbach (talk) 08:36, 19 December 2019 (UTC)
thread_title:  German article and Manual of Style 

message: I'd like to thank  for this change to the illustration on known computational complexity vs time. Beyond the reason he cites for the change (difficulty of updating the older image) the new one fixes a big problem with the older image: it showed the complexity as changing continuously and piecewise-linearly over time, but actually the change was discontinuous and piecewise-constant. —David Eppstein (talk) 21:36, 23 February 2020 (UTC)
thread_title:  Illustration of complexity 

message: The article mentions the product of a matrix with a column vector, which is just a special case of the matrix product. It should also mention the product of a matrix with a vector, what is quite similar, but yet formally different. Otherwise there is a formal problem with the discussion of eigenvectors. Madyno (talk) 21:43, 3 September 2020 (UTC)
replies: text: The product of a matrix with a vector cannot be defined if the coordinates of the vector are not defined. You are thinking of the application of a linear map on a vector, which is represented, when coordinates are defined, by the product of the matrix of the linear map by the column vector of the coordinates of the vector. D.Lazard (talk) 08:21, 4 September 2020 (UTC)
thread_title:  Product matrix with vector 

message: See, the matrix multiplication ISN‘T binary. It is just a simple row of calculations and has been and is also used in analog computers, which are also NOT binary. That‘s it. This is the entire reason I wrote this. 91.181.173.247 (talk) 07:46, 21 May 2022 (UTC)
thread_title:  Ok, so not everything here is true… 

message: In "It is not known whether matrix multiplication can be performed in  time.", the formula seems wrong.  can be much larger than 2, which could result in   or worse. The  should be removed like in the German article, or removed from the superscript:  Cymno (talk) 11:44, 26 July 2022 (UTC)
replies: text: Incorrect. O-notation is only meaningful in the limit for large values of n. Every expression that can be bounded as  must be arbitrarily close to 2 for sufficiently large values of n. It is indeed unknown whether a bound of the form  can be achieved. If you have edited the German article based on the same misunderstanding, perhaps you should undo your edits until you understand this material better. —David Eppstein (talk) 23:30, 26 July 2022 (UTC)
replies: text: Isn't it possible to simplify the expression to avoid nested O(.) ? I have difficulties to understand what O(o(1)) is supposed to mean, let alone O(n^{2+o(1)}) - Jochen Burghardt (talk) 09:29, 27 July 2022 (UTC)
replies: text: That's a good point, changed to n^{2+o(1)} accordingly. O(n^{o(1)}) = n^{o(1)}, but that's not entirely obvious. Fawly (talk) 21:48, 27 July 2022 (UTC)
replies: text: I agree that the outer O is redundant and better removed. —David Eppstein (talk) 23:04, 27 July 2022 (UTC)
thread_title: o(1)

message: I have reservations regarding the accuracy of the logical biconditional statement within the Non-commutativity sub-section, specifically the assertion that:
 if  is a  matrix with entries in a field , then \mathbf{A}\mathbf{B} = \mathbf{B}\mathbf{A} for every  matrix  with entries in , if and only if \mathbf{A}=c\,\mathbf{I} where , and  is the  identity matrix."
I believe it should be expressed as a unidirectional implication, where the statement holds when \mathbf{A}=c\,\mathbf{I} \vee \mathbf{B}=c\,\mathbf{I}. Indeed, the biimplication is in contrast with an assertion made a few lines below, which states that:
 "One special case where commutativity does occur is when  and  are two (square) diagonal matrices (of the same size); then ". 
Furthermore, matrix multiplication is commutative in other scenarios, for instance when one matrix is a scalar multiple of the other or again when they are simultaneously diagonalizable. Simonedl (talk) 18:24, 13 October 2023 (UTC)
replies: text: The article is correct.  The initial statement says that the multiples of the identity are the only matrices which commute with everything, not the only ones that commute with some things.  I.e., that these are exactly the elements of the center. 35.139.154.158 (talk) 19:47, 13 October 2023 (UTC)
replies: text: Ah, now it is clear. Since English is not my native language, I misunderstood the sentence. Thank you for the clarification. Simonedl (talk) 23:51, 13 October 2023 (UTC)

text: Note that your first citation requires commutation of the given A with every B. So you are not free to chose B = c I, nor to restrict B to a diagonal matrix, nor to require B to be a scalar multiple of A or to be simultaneously diagonalizable with A. - Jochen Burghardt (talk) 21:25, 13 October 2023 (UTC)
thread_title:  Non-commutativity exceptions