In Mathematica I have the variable u defined as follows:
u = {1,2,3}
Now I want the product a*u to show as:
a {1,2,3}
but a*u returns this:
{a,2 a,3 a}
I have tried HoldForm and other things, but I cannot make it work. Any help?
u = {1, 2, 3};
a u
{a, 2 a, 3 a}
s = Inactivate[a u]
a {1, 2, 3}
Activate[s]
{a, 2 a, 3 a}
InputForm[s]
Inactive[Times][a, {1, 2, 3}]