Jump to content

Calculate M=AC+CA ?

Featured Replies

Hello,

 

I am facing a problem now. Any one can help?

 

A and C are two real n*n matrices, while A is a symmetrical matrix and C is not. Now I need to calculate a matrix M, which satisfies M=AC+CA, on computer. Since C is not symmetrical, so far I have to use the same matrix multiplication routine twice to get the results of AC and CA, respectively. I am wondering whether there is a way that I can use the matrix multiplication routine only once and get the matrix M.

 

Thank you a lot.

I don't really see how since with matrix multiplication in general [math] \mathbf{AC} \neq \mathbf{CA}[/math].

 

I looked at something like [math] ({\mathbf{CA}}^T)^T = (\mathbf{A}^T \mathbf{C}^T)^T = (\mathbf{A} \mathbf{C}^T)^T [/math] but you still have to compute the [math] (\mathbf{A} \mathbf{C}^T) [/math] which doesn't appear to save anything.

 

For that matter, even if both A & B are symmetric, in general [math] \mathbf{AB} \neq \mathbf{BA}[/math]. [math] \mathbf{AB} = (\mathbf{BA})^T[/math]

Edited by Bignose

  • Author

Hi, since using a matrix multiplication routine takes a long time especially when the matrices are very big, and in my program I have to use the matrix multiplication routine twice per loop, then after all the loops, it might take one day to get the result. That is why I wanted to find a way to reduce the number of matrix multiplication. I was wondering if there is a way that we can derive CA from AC (or AC from CA)? Thank you.

 

I don't really see how since with matrix multiplication in general [math] \mathbf{AC} \neq \mathbf{CA}[/math].

 

I looked at something like [math] ({\mathbf{CA}}^T)^T = (\mathbf{A}^T \mathbf{C}^T)^T = (\mathbf{A} \mathbf{C}^T)^T [/math] but you still have to compute the [math] (\mathbf{A} \mathbf{C}^T) [/math] which doesn't appear to save anything.

 

For that matter, even if both A & B are symmetric, in general [math] \mathbf{AB} \neq \mathbf{BA}[/math]. [math] \mathbf{AB} = (\mathbf{BA})^T[/math]

 

Yeah, you are right, if A and B are both symmetrical, I can easily derive BA from AB (BA=(AB)^T). The problem now is A is symmetrical but B is not. So I am wondering whether there is a way to reduce the number of matrix multiplication routine usage. Many thanks.

 

Since M=AC+CA, I am thinking whether there is a way to make it like M=A(C+C^T)? Thank you.

Edited by loveislonely

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.