Scalar Multiplication

Learn how to implement scalar multiplication on matrices using R, Rcpp, Armadillo, and Eigen.

Scalar multiplication is defined over a matrix of any dimension.

𝑅=π‘˜βˆ—π΄π‘… = π‘˜βˆ—π΄

π‘Ÿπ‘–π‘—=π‘˜βˆ—π‘Žπ‘–π‘—π‘Ÿ_{𝑖𝑗} =π‘˜βˆ—π‘Ž_{𝑖𝑗}

Here:

  • 𝐴𝐴 is (π‘šΓ—π‘›)(π‘š \times 𝑛) matrix
  • π‘˜π‘˜ is a scalar value

Get hands-on with 1400+ tech skills courses.