If you want to multiply matrices, the standard function for multiplication
(Times) will not probably be useful for you, because it multiplies the
elements of the matrices and not the matrices themselves. You may try with
Dot, which contracts the last index in the first tensor with the first index
in the second, allowing for multiplication of matrices or matrices with
vectors.
As for your second question, I am afraid I can't understand what you mean.
Janusz Kawczak wrote:
> Dear Mathematica Users:
>
> I am trying to force an output to appeat in a certain way, but without
> much
> success. Here is my problem.
>
> First, how to "teach" M. that some symbols are matrices, vectors, etc...
> and
> that the laws of the real arithmetic do not apply.
>
> Let's take A to be a matrix, and u and v, vectors.
> I would like to have the following:
>
> u A (u - <u>)=u A u -u A <u>
>
> the operator is not symmetric. Whenever I do this oparation I get
> something like
> A u u or A u ^2. I just cannot force the order to be correct!
>
> Also, I would like to have the oparator to
> be iterative, i.e.
>
> v A {(u A (u - <u>) -<u A (u - <u>)>}
> =v A u A u - v A u A <u> - v A <u A u> + v A u A <u>, and so on.
>
> Any suggestions.
> Thank you in advance.
> Janusz.
>
> P.S. Please cc to jkawczak at math.uncc.edu
--
Ignacio Rodriguez Ramirez de Arellano
Unidad de RMN
Universidad Complutense
Paseo Juan XXIII, 1
Madrid 28040, Spain
Tel. 34-91-394-3288
Fax 34-91-394-3245
e-mail: ignacio at sgirmn.pluri.ucm.es