Let's say I have a simple matrix equation:


Where B and C are known. Assuming all those are 2 x 2 matrices

$ \begin{bmatrix} a & b \\ c & d \end{bmatrix} = \begin{bmatrix} e & f \\ g & h \end{bmatrix} * \begin{bmatrix} i & j \\ k & l \end{bmatrix} $

I want to test wheter $b>c$.

In two 2 x 2 matrices this is relatively easy to do since I can see that $ b= ej + fl $ and $ c = gi +hk $. But in matrix equations with larger matrices or more matrices it might be quite difficult to write $b$ and $c$ as above.

Is there any technique to make this sort of intra-matrix comparisons without having to write each element individually?

I understand that matrix can be broken in a sum of its column vectors, which seems related, but I could not find a way this information when elements are on different rows.

  • 2
    $\begingroup$ You can always compute a single entry in the matrix product by taking the dot product of the corresponding row and column of the two matrices that are multiplied together. This is a factor of $n$ less work than computing the entire product. $\endgroup$ – Brian Borchers Oct 10 '18 at 19:52
  • $\begingroup$ @BrianBorchers You should write that up as an answer. $\endgroup$ – amd Oct 10 '18 at 20:13
  • $\begingroup$ If the question was clear I might try to answer it, but I'm not clear on the actual question... $\endgroup$ – Brian Borchers Oct 10 '18 at 21:10

You can always take elements from first matrix row space and second matrix column space and compute the dot product. In fact it is all matter of syntax. For example, in your equation, $b$ would become $b = B_{1,\cdot}^T \cdot C_{\cdot,2}$.

By the way, it is common to index matrix entries as $b_{i,j}$ where $i$ is the row number and $j$ is the column number. It makes indexing much simpler than using alphabet.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.