Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

How to get a matrix multiply that considers dimensions?

  • To: mathgroup at
  • Subject: How to get a matrix multiply that considers dimensions?
  • From: pwm at (Phil W. Miller x8335 1-e138)
  • Date: Wed, 7 Oct 92 18:54:16 EDT

I just ran into a problem where Mma lack of dimension on a vector caused
problems.  I need to take the matrix product of a matrix with a vector
times its transpose; i.e., (A x) (A x)' 

I needed the following Mma syntax to get this
Outer[Times, A . x, A . x], which is ugly but okay.  But if Ax is a matrix
instead of a column vector, one needs (A.x) . Transpose[A.x] 

Is there a general way to do matrix multiplication in Mma where dimension
is considered?  I thought about it briefly, but do not know how to 
cope with the fact that one dimensional lists are neither row or
column vectors. 

Your help is appreciated.  

Phil Miller

  • Prev by Date: Loop problem
  • Next by Date: AllRoots
  • Previous by thread: Re: Loop problem
  • Next by thread: AllRoots