Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to keep multiplication sign "*" ( Please)

128 views
Skip to first unread message

Volkan

unread,
Mar 15, 2009, 6:28:37 AM3/15/09
to
How can I keep the multiplication sign in a symbolic calculation
output such as:

Sum[A[i][j] *B[i][j], {i, 1, 2}, {j, 1, 2}]


gives
A[1][1] B[1][1] + A[1][2] B[1][2] + A[2][1] B[2][1] + A[2][2] B[2][2]

but what I want is it should seem like

A[1][1] *B[1][1] + A[1][2] *B[1][2] + A[2][1] *B[2][1] + A[2][2] *B[2]
[2]

Is this possible? Please help about this...

thanks

Raffy

unread,
Mar 16, 2009, 5:23:08 AM3/16/09
to

Sum[A[i][j]*B[i][j], {i, 1, 2}, {j, 1, 2}] // InputForm

Sjoerd C. de Vries

unread,
Mar 16, 2009, 5:25:28 AM3/16/09
to
Unprotect[Times];
Times /: MakeBoxes[Times[x_, y_], StandardForm] :=
RowBox[{MakeBoxes[x, StandardForm], MakeBoxes["*", StandardForm],
MakeBoxes[y, StandardForm]}]
Protect[Times];

Cheers -- Sjoerd

Bob Hanlon

unread,
Mar 16, 2009, 5:21:41 AM3/16/09
to
The multiplication sign is visible in InputForm

Sum[A[i][j]*B[i][j], {i, 1, 2}, {j, 1, 2}] // InputForm

A[1][1]*B[1][1] + A[1][2]*B[1][2] + A[2][1]*B[2][1] + A[2][2]*B[2][2]


Bob Hanlon

---- Volkan <vis...@gmail.com> wrote:

=============

0 new messages