# Can a symmetric matrix be found using matrix-vector operation while maintaining matrix-vector operatin?

Consider $$A\in\mathbb{R}^{n\times n}$$ its not a special matrix and in the worst case all of its entries are non-zero. I am looking for a way to compute $$AA^{T}$$ using matrix-vector operation. The total number of flops are $$(2n-1)\frac{n(n+1)}{2}$$ because all I have to do for a symmetric matrix like $$C=AA^{T}$$ is to compute the diagonal entires which are $$C(i,i)=A(i,:)^TA(i,:)$$. What I want now is to compute the lower triangular part and then when I am done I just say that the upper triangular part is the same as the lower triangular part. The problem is can I do it in matrix-vector multiplication or will it force me to perform unnecessary multiplication (like multiplying elements in the upper part)? It is clear that a vector-vector computation would work but I am interested to know if a matrix-vector computation would work or not.

• It's not clear to me .. do you need all of $\mathbf C = \mathbf A \mathbf A^T$, or just the diagonal entries? Do you need to tabulate $\mathbf C$, or just apply it's action to a vector? Your question is close but not quite there. Jul 7 at 15:03
• I wish to compute $C=AA^{T}$ by just computing the lower triangular part of $C$ that is where I am stuck I can do that using scalar operation but I was wondering if its possible to do it as a matrix-vector operation @rchilton1980
– TYWQ
Jul 7 at 15:12
• The diagonal entries and the upper triangular part will follow from the symmetry of $C$ @rchilton1980
– TYWQ
Jul 7 at 15:13
• Which language are you using? I think that in Matlab and Python a call of the form A * A' (with the same variable on both sides) already gets translated to a ?SYRK BLAS call that does this under the hood. (More generally, if the question is "what is the fastest way to do this?", then I believe the answer will be "use ?SYRK". Jul 7 at 16:14
• Can you do matrix-vector products only with $A$ or also with $A^T$? Or alternatively, can you do products with vectors from the left, i.e., $v^TA$? Jul 7 at 20:30