# [Maxima] stuck with vectors

Dan Solomon Daniel.L.Solomon at nasa.gov
Fri Jan 5 22:21:50 CST 2007

```This helped - Thanks!

But here's a follow up question:  when I substituted #s for x, expand
(''mm); gave a one by one matrix, which seems a little weird:
matrix([a polynomial in the parameters])

then I substituted #s for the parameters, and expand(''mm); gave a
number without any brackets.

Next I divided xprime by sqrt(mm) to get a unit tangent vector

T:xprime/sqrt(mm);
which returns the vector expression for xprime divided by the big
mess for mm

Then issuing ''T; to substitute for everything, responds with an
error message:
FULLMAP found arguments with incompatible structure.

On Jan 5, 2007, at 4:42 PM, Barton Willis wrote:

> -----maxima-bounces at math.utexas.edu wrote: -----
>
>> First question:  should I declare x somehow to be
>> a vector, or does the next line do so by using x[1], x[2], x[3]?
>
> There is no need to declare x to be a vector. Maxima doesn't
> have a vector data structure---just lists, matrices, and arrays.
>
>> xprime:(1+RR) * (1-RR) . P1 + (1+RR) . P2 + 2 *
>> (1-RR) * SQ . matrix ([x[1]],[x[2]],[x[3]]);
>
> I think you used "." twice for scalar times column vector.
> Instead of "." (non commutative multiplication), you need "*"
> (commutative multiplication). Something like:
>
> (1+RR) * (1-RR) * P1 + (1+RR) . P2 + 2 * (1-RR) * SQ * matrix
> ([x[1]],[x[2]],[x[3]]);
>
> After that, expand will expand 'mm' into a (giant) scalar.
>
> Barton
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
```