## Error in matrix multiplication...

Hi everybody

In the attached file, when I run the code an error appears while calculating "omegaL1" parameter. The dimensions of the matrices are correct but the source of error is unknown to me. Can anyone help me?

I have two symmetric real matrices as below (Mt,Kk).

I multilpy them in Mt.Kk.Mt.

But the result is not symmetric.!!!!why????

 >
 >
 (1)
 >
 (2)
 >
 (3)
 >
 (4)
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >

I couldnt upload Kk.mlp and Mt.mlp so changed their extensions to mw. for using please change them to .mlp

## Is there a way to make Maple output display explic...

Hi there,

I'm new here. My first question:

Is there a way to make Maple output display explicit multiplcations signs in 2D-math?

Example:
When you enter 5*2^x Maple will output . Is there a way to make Maple display the multiplications signs in output in stead just implicit multiplication signs (i.e. whitepaces)? (I would settle for Maple display all multiplication signs in output - not just the ones which are made explicit in the input.)

I searched this site. No luck. I looked into "Typesetting Rule Assistant", but I couldn't find a way to alter the output of multiplication sign (*).

Can you guys help me?

Kind Regards,

Jens

P.S.: I'm a teacher from Denmark. We use Maple before college/university for a lot of pupils. Some less competent pupils have a tendency to overlook the whitespace.

## Elementwise matrix multiplication fails. Why?...

Consider the following code:

```LM := [
Matrix([[1,2],[3,4]]),
Matrix([[5,6],[7,8]])
];
A := Matrix([[0,1],[1,0]]);
map(x -> A . x,LM);
A .~ LM;```

where LM is a list of two matrices (just a test example), and A is some (test)matrix that I want to multiply onto each of these two matrices from the left, say. The map-construction works, as expected, but the elementwise operation .~ produces an error. Why?

## element by element vector multiplication...

I found the following:

Does this not apply to vectors?  If not what syntax is required?  I cannot seem to execute this simple operation which I can easily do in MATLAB.  If you have such a capability why is it not clearly documented in the HELP pages?

## Multiplier in a specific range...

Dear all,

I am creating an animation, and I was wondering if I can add a multiplier to my equation in a specific range.  So starting from z:=0.2 add a multiplier (z+1). The code I have so far is added. Does anyone know a code for this?

Kind regards

```restart;
with(plots);
a := -1/2; b := 1/2; c := -2; d := 2; n := 20;
g := proc (x) options operator, arrow; value(Int(sigma(t), t = 0 .. x)) end proc;
sigma := proc (z) options operator, arrow; 2*sqrt(2*h^2-4*z^2)*z/h^2 end proc;
h := i/n;
for i to n do
an2[i] := plot(sigma(z), z = -(1/2)*h .. (1/2)*h, view = [a .. b, c .. d], color = AQUAMARINE);
an3[i] := plot(2*g(x), x = 0 .. (1/2)*h, view = [a .. b, c .. d], color = RED)
end do;
p := plots[display]([seq(an2[i], i = 1 .. n)], insequence = true);
q := plots[display]([seq(an3[i], i = 1 .. n)], insequence = true); display(p, q)```

## Maple help with lifting a vector...

Hej all,

I have a problem. When i have a 9-1 vector "DD" how can i get maple to solve DD^2 my equation is A=(pi/4)*DD^2 should be simple.

Also when i have two vectors one is 9-1 and the other is 5-1 i want to divide the 5-1 / 9-1 but i want all possible soluitons? not just 5 results but 45 results.(the zip fuction only gives me 5 results)

Pls help

Kind regards

## Warning, solving for expressions other than names ...

system3d := a[1](a[1])+a[2]*a[4]+a[3]*a[7]-a[1](a[1])-a[2]*a[10]-a[3]*a[19], a[1]*a[2]-a[1]*a[2]+a[2]*a[5]-a[2]*a[11]+a[3]*a[8]-a[3]*a[20], a[1]*a[3]-a[1]*a[3]+a[2]*a[6]-a[2]*a[12]+a[3]*a[9]-a[3]*a[21], a[1]*a[4]-a[1]*a[4]-a[2]*a[13]-a[3]*a[22]+a[4]*a[5]+a[6]*a[7], a[2]*a[4]+a[5](a[5])+a[6]*a[8]-a[1]*a[5]-a[2]*a[14]-a[3]*a[23], a[3]*a[4]+a[5]*a[6]+a[6]*a[9]-a[1]*a[6]-a[2]*a[15]-a[3]*a[24], a[1]*a[7]+a[4]*a[8]+a[7]*a[9] = a[1]*a[7]+a[2]*a[16]+a[3]*a[25], a[2]*a[7]+a[5]*a[8]+a[8]*a[9] = a[1]*a[8]+a[2]*a[17]+a[3]*a[26], a[3]*a[7]+a[6]*a[8]+a[9](a[9]) = a[1]*a[9]+a[2]*a[18]+a[3]*a[27];
print(`output redirected...`); # input placeholder
a[2] a[4] - a[2] a[10] + a[3] a[7] - a[3] a[19],

a[2] a[5] - a[2] a[11] + a[3] a[8] - a[3] a[20],

a[2] a[6] - a[2] a[12] + a[3] a[9] - a[3] a[21],

-a[2] a[13] - a[3] a[22] + a[4] a[5] + a[6] a[7], a[2] a[4]

+ a[5](a[5]) + a[6] a[8] - a[1] a[5] - a[2] a[14] - a[3] a[23],
-a[1] a[6] - a[2] a[15] + a[3] a[4] - a[3] a[24] + a[5] a[6]

+ a[6] a[9], a[1] a[7] + a[4] a[8] + a[7] a[9] = a[1] a[7]

+ a[2] a[16] + a[3] a[25], a[2] a[7] + a[5] a[8] + a[8] a[9] =

a[1] a[8] + a[2] a[17] + a[3] a[26], a[3] a[7] + a[6] a[8]

+ a[9](a[9]) = a[1] a[9] + a[2] a[18] + a[3] a[27]

solve({system3d}, {a[1]*a[2], a[1]*a[3], a[1]*a[4], a[1]*a[5], a[1]*a[6], a[1]*a[7], a[1]*a[8], a[1]*a[9], a[2]*a[4], a[2]*a[5], a[2]*a[6], a[2]*a[7], a[2]*a[10], a[2]*a[11], a[2]*a[12], a[2]*a[13], a[2]*a[14], a[2]*a[15], a[2]*a[16], a[2]*a[17], a[2]*a[18], a[3]*a[4], a[3]*a[7], a[3]*a[8], a[3]*a[9], a[3]*a[19], a[3]*a[20], a[3]*a[21], a[3]*a[22], a[3]*a[23], a[3]*a[24], a[3]*a[25], a[3]*a[26], a[3]*a[27], a[4]*a[5], a[4]*a[8], a[5]*a[6], a[5]*a[8], a[6]*a[7], a[6]*a[8], a[6]*a[9], a[7]*a[9], a[8]*a[9], a[1](a[1]), a[5](a[5]), a[9](a[9])});
%;
Warning, solving for expressions other than names or functions is not recommended.
{a[1] a[2] = a[1] a[2], a[1] a[3] = a[1] a[3],

a[1] a[4] = a[1] a[4], a[1] a[5] = a[2] a[10] - a[3] a[7]

+ a[3] a[19] + a[5](a[5]) + a[6] a[8] - a[2] a[14]

- a[3] a[23], a[1] a[6] = -a[2] a[15] + a[3] a[4] - a[3] a[24]

+ a[5] a[6] + a[6] a[9], a[1] a[7] = a[1] a[7], a[1] a[8] = a[

2] a[7] - a[2] a[17] - a[3] a[26] + a[5] a[8] + a[8] a[9], a[1]

a[9] = a[3] a[7] + a[6] a[8] + a[9](a[9]) - a[2] a[18]

- a[3] a[27], a[2] a[4] = a[2] a[10] - a[3] a[7] + a[3] a[19],

a[2] a[5] = a[2] a[11] - a[3] a[8] + a[3] a[20],

a[2] a[6] = a[2] a[12] - a[3] a[9] + a[3] a[21],

a[2] a[7] = a[2] a[7], a[2] a[10] = a[2] a[10],

a[2] a[11] = a[2] a[11], a[2] a[12] = a[2] a[12],

a[2] a[13] = -a[3] a[22] + a[4] a[5] + a[6] a[7],

a[2] a[14] = a[2] a[14], a[2] a[15] = a[2] a[15],

a[2] a[16] = -a[3] a[25] + a[4] a[8] + a[7] a[9],

a[2] a[17] = a[2] a[17], a[2] a[18] = a[2] a[18],

a[3] a[4] = a[3] a[4], a[3] a[7] = a[3] a[7],

a[3] a[8] = a[3] a[8], a[3] a[9] = a[3] a[9],

a[3] a[19] = a[3] a[19], a[3] a[20] = a[3] a[20],

a[3] a[21] = a[3] a[21], a[3] a[22] = a[3] a[22],

a[3] a[23] = a[3] a[23], a[3] a[24] = a[3] a[24],

a[3] a[25] = a[3] a[25], a[3] a[26] = a[3] a[26],

a[3] a[27] = a[3] a[27], a[4] a[5] = a[4] a[5],

a[4] a[8] = a[4] a[8], a[5] a[6] = a[5] a[6],

a[5] a[8] = a[5] a[8], a[6] a[7] = a[6] a[7],

a[6] a[8] = a[6] a[8], a[6] a[9] = a[6] a[9],

a[7] a[9] = a[7] a[9], a[8] a[9] = a[8] a[9],

a[1](a[1]) = a[1](a[1]), a[5](a[5]) = a[5](a[5]),

a[9](a[9]) = a[9](a[9])}

the program runs however the warning message pops ...what can i do to eliminate the problem???

## Can't multiply???...

Hello!

I'm trying to plt something, I can't see why Maple isn't multiplying these two rows as it should.

Can anyone see the problem?

restart;

with(Units[Standard]);
with(ArrayTools);

with(LinearAlgebra);

with(Statistics);
with(plots);
with(CurveFitting);

 (1)

Thank you!

## Wrong type inside a loop...

Eight matrices inside the list J:

J := [Matrix([[1, 0], [0, 1]]), Matrix([[0, -I], [-I, 0]]), Matrix([[0, -1], [1, 0]]), Matrix([[-I, 0], [0, I]]), Matrix([[-1, 0], [0, -1]]), Matrix([[0, I], [I, 0]]), Matrix([[0, 1], [-1, 0]]), Matrix([[I, 0], [0, -I]])];

Function member identifies J[2] as a member of J and returns its position in j:

member(J[2], J, 'j'); j;

Matrix multiplication inside a loop does not have a matrix type:

for i to 1 do for j to 2 do a := J[i].J[j]; member(a, J, 'k'); print(i, j, k, a, whattype(a)) end do end do;

Has anyone any ideia of what is going on?

## Dual Quaternion Multiplication Table ...

I am trying to setup a Dual Quaternion Multiplication Table. I found the table on Wikki. I  need some help here.

Have set

x1  =1   x2 = i   x3  =j   x4   =k   x5 =e   x6 = ei   x7 = ej   x8 =ek

## How can I multiply two bases of voudions?...

There are the complexes (C), quaternions (H or Q), octionions (O), sedenions (S) and the pathions (P). I have found the multiplication tables of them, although according to signs (+ or -) there differents at pathions. The important question is that How can I multiply two bases, i_n and i_m of higher dimensions, like in the routions or in the voudions?

Should I xor the indexes of the bases? Like this way: i_1 * i_2 = i_(1^2) = i_3

## Matrix multiplication...

Hi....how can i multiply the 9*4 matrix on the left side of this table to the 9*1 vector on the right side of it (last column) with a kind of product of cells that results a 9*4 matrix made up of cells like this one's [(a,b,c,d)⊗(e,f,g,h)=(ae,bf,cg,dh)]

 SO ST WO WT Weight C1 (0.55,0.67,0.78,0.89) (0.7,0.8,0.8,0.9) (0.767,0.867,0.93,0.967) (0.72,0.83,0.83,0.93) (0.7,0.8,0.8,0.9) C2 (0.67,0.78,0.89,0.97) (0.8,0.9,1,1) (0.73,0.83,0.867,0.93) (0.66,0.76,0.79,0.90) (0.8,0.9,1,1) C3 (0.78,0.89,0.89,1) (0.8,0.9,1,1) (7.67,8.67,9.3,9.67) (0.55,0.66,0.69,0.79) (0.767,0.867,0.93,0.967) C4 (0.78,0.89,0.89,1) (0.06,0.13,0.167.0.267) (0.8,0.9,1,1) (0.76,0.86,0.90,0.97) (0.43,0.53,0.567,0.667) C5 (0.78,0.89,0.89,1) (0.8,0.9,1,1) (0.06,0.13,0.167.0.267) (0.76,0.86,0.90,0.97) (0.73,0.83,0.867,0.93) C6 (0.74,0.85,0.93,1) (0.67,0.767,0.83,0.9) (0.73,0.83,0.867,0.93) (0.62,0.72,0.83,0.90) (0.8,0.9,1,1) C7 (0.59,0.70,0.74,0.85) (0.567,0.667,0.73,0.83) (0.667,0.767,0.83,0.9) (0.69,0.79,0.86,0.93) (0.067,0.1,0.2,0.3) C8 (0.74,0.85,0.93,1) (0.7,0.8,0.9,0.93) (0.567,0.667,0.73,0.83) (0.79,0.90,0.97,1) (0.73,0.83,0.867,0.93) C9 (0.70,0.81,0.85,0.96) (0.7,0.8,0.9,0.93) (0.7,0.8,0.8,0.9) (0.59,69,0.76,0.86) (0.53,0.63,0.667,0.767)

## multi-matrix multiplication...

I want to get the result of multi-matrix multiply like followed below,

but error "final value in for loop must be numeric or character"

(*n is arbitrary and B[1],B[2],...,B[n] have been obtained*)

A:=LinearAlgebra:-IdentityMatrix(n);
#using the multiplication operation of matrix
for i from 1 to n do
A:=LinearAlgebra:-Multiply(A,B[i]);
od:

return A

help me

thanks

## Problem in Physics package with multiplication by ...

Perhaps I am being daft, but to me the Physics package seems, quite surprisingly, to have trouble multiplying by a nonzero, non-square matrix. The test code

`restart:with(Physics):Matrix(2,2,fill = 0) . Vector(2),Matrix(2,2,fill = 1) . Vector(2),Matrix(2,3,fill = 0) . Vector(3);Matrix(2,3,fill = 1) . Vector(3);`

produces the following output:

Error, (in Vector[column]) Matrix index out of range

i.e., the last expression cannot be evaluated; while the test code (where no loading of the Physics package is performed)

`restart:#with(Physics):Matrix(2,2,fill = 0) . Vector(2),Matrix(2,2,fill = 1) . Vector(2),Matrix(2,3,fill = 0) . Vector(3),Matrix(2,3,fill = 1) . Vector(3);`

produces the following expected output:

PS: To be sure, I have from http://www.maplesoft.com/products/maple/features/physicsresearch.aspx downloaded the latest version (2014, March 19, 4:0 hours) of the Physics package for Maple 17 (the version I am running).

 1 2 Page 1 of 2
﻿