What is matrix scalar multiplication?
Scalar multiplication is one of the most fundamental operations in linear algebra. Given a matrix A and a single real number lambda (the scalar), the scalar product lambda times A is formed by multiplying every individual element of A by lambda. The result is a new matrix C with exactly the same number of rows and columns as A. Unlike matrix-by-matrix multiplication, no dimension matching is required and the operation works on any rectangular matrix.
How to use this calculator
First choose the number of rows (\(i\)) and columns (\(j\)) of your matrix. Then type the entries of matrix A in the text box, one row per line, separating values within a row by commas or spaces. Enter the scalar lambda — it can be negative, a decimal, or written in scientific notation such as \(1.5e\text{-}3\). Pick how many significant digits you want displayed, then submit. The calculator returns the result matrix lambda times A, preserving the original dimensions.
The formula explained
The rule is applied element by element: $$(\lambda \cdot A)_{ij} = \lambda \cdot a_{ij}, \quad i = 1 \ldots \text{Rows}, \; j = 1 \ldots \text{Cols}$$ for every row \(i\) and column \(j\). Because each element is scaled independently, the operation is both commutative in the scalar (\(\lambda A = A \lambda\)) and distributive (\(\lambda \cdot (A + B) = \lambda A + \lambda B\)). A scalar of 0 yields the zero matrix; a scalar of 1 returns A unchanged; and a scalar of -1 returns the negation of A.
Worked example
Let \(A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}\) and \(\lambda = -5\). Then $$c_{11} = -5 \times 1 = -5, \quad c_{12} = -5 \times 2 = -10, \quad c_{21} = -5 \times 3 = -15, \quad c_{22} = -5 \times 4 = -20.$$ The result is \(C = \begin{bmatrix} -5 & -10 \\ -15 & -20 \end{bmatrix}\). As a second example, scaling \(A = \begin{bmatrix} 2 & -1 & 0 \\ 4 & 3 & 5 \end{bmatrix}\) by \(\lambda = 0.5\) gives \(\begin{bmatrix} 1 & -0.5 & 0 \\ 2 & 1.5 & 2.5 \end{bmatrix}\).
FAQ
Does the matrix have to be square? No. Any rectangular shape works, including row vectors and column vectors. The result keeps the same shape.
What happens with an empty cell? Missing entries are treated as 0, so a short row is padded with zeros up to the chosen number of columns.
Can the scalar be a fraction or negative? Yes. Negative numbers, decimals and scientific notation are all supported, and a scalar of 0 produces the zero matrix.