-2

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!

Jasmine
  • 1,225
  • 3
  • 10

1 Answers1

3

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

enter image description here