loveislonely Posted June 26, 2008 Posted June 26, 2008 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.
Bignose Posted June 27, 2008 Posted June 27, 2008 (edited) 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 June 27, 2008 by Bignose
loveislonely Posted June 27, 2008 Author Posted June 27, 2008 (edited) 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 June 27, 2008 by loveislonely
Bignose Posted June 27, 2008 Posted June 27, 2008 I just don't see how. I'd look into some of the matrix multiplication routines that MATLAB uses. MATLAB is by and far the fastest matrix multiplication I've ever seen.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now