I have a matrix,
P = {{1, 2, 4}, {3, 4, 1}, {2, 1, 6}}
ff=6
How to do the multiplication of ff with P?
ff.P and ff*P
are not working!
The ff.P does not work because it is a matrix multiplication and clearly ff is not such object.
On the other hand, ff*P and P*ff should work and they do for me.
Note that you can also write ff P and P ff. Be careful to leave a proper space between them.
The following worked for me as I said already
$Version
"12.0.0 for Linux x86 (64-bit) (April 7, 2019)"
P = {{1, 2, 4}, {3, 4, 1}, {2, 1, 6}};
ff = 6;
And now
P*ff // MatrixForm
ff*P // MatrixForm
Both of the above expressions result in
ff*Preturns{{6, 12, 24}, {18, 24, 6}, {12, 6, 36}}for me, as expected – Lukas Lang May 19 '21 at 07:45MatrixFormin the definition of your matrix? If yes, then don't. – Roman May 19 '21 at 08:32