<br><br><div class="gmail_quote">On Sat, Jun 6, 2009 at 1:59 PM, Alan G Isaac <span dir="ltr"><<a href="mailto:aisaac@american.edu">aisaac@american.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On 6/6/2009 2:58 PM Charles R Harris apparently wrote:<br>
> How about the common expression<br>
> exp((v.t*A*v)/2)<br>
> do you expect a matrix exponential here?<br>
<br>
<br>
</div>I take your point that there are conveniences<br>
to treating a 1 by 1 matrix as a scalar.<br>
Most matrix programming languages do this, I think.<br>
For sure GAUSS does.  The result of   x' * A * x<br>
is a "matrix" (it has one row and one column) but<br>
it functions like a scalar (and even more,<br>
since right multiplication by it is also allowed).<br>
</blockquote><div><br>It's actually an inner product and the notation <x, A*x> would be technically correct. More generally, it is a bilinear function of two vectors. But the correct notation is a bit cumbersome for a student struggling with plain old matrices ;)<br>
<br>Ndarrays are actually closer to the tensor ideal in that M*v would be a contraction removing two indices from a three index tensor product. The "dot" function, aka *, then functions as a contraction. In this case x.T*A*x works just fine because A*x is 1D and x.T=x, so the final result is a scalar (0D array). So making vectors 1D arrays would solve some problems. There remains the construction v*v.T, which should really be treated as a tensor product, or bivector.<br>
<br>Chuck<br></div><br></div><br>