Skip to content
Math

Matrix by Scalar Calculator

Enter a scalar k and the four elements of a 2x2 matrix to get the result matrix B = k x A. Every element is multiplied by k, with a full step-by-step panel showing the arithmetic for each cell. The result updates as you type, making it easy to explore how different scalars stretch or shrink the matrix.

Your details

The number that multiplies every element of the matrix. Can be any real number.
Top-left element of the matrix.
Top-right element of the matrix.
Bottom-left element of the matrix.
Bottom-right element of the matrix.
Result matrix B = k x A
[ 6 -3 ] [ 0 15 ]

The 2x2 product matrix with every element multiplied by k

B[1,1]6
B[1,2]-3
B[2,1]0
B[2,2]15
Scale factor3
B[1,1]6
B[1,2]-3
B[2,1]0
B[2,2]15

Scalar 3 applied to all 4 elements of the 2x2 matrix.

  • Each element is scaled up by a factor of 3.
  • det(A) = 10, det(B) = det(kA) = k^2 x det(A) = 9 x 10 = 90.
  • Scalar multiplication is distributive: k(A + B) = kA + kB, and associative: (jk)A = j(kA).

Next stepYou can use this result as input for matrix multiplication or to compute the determinant.

Formula

B=kABij=kAiji,jB = k \cdot A \quad \Leftrightarrow \quad B_{ij} = k \cdot A_{ij} \quad \forall\, i,\, j

Worked example

For k = 3 and A = [[2, -1], [0, 5]]: B[1,1] = 3 x 2 = 6, B[1,2] = 3 x (-1) = -3, B[2,1] = 3 x 0 = 0, B[2,2] = 3 x 5 = 15. Result: B = [[6, -3], [0, 15]]. The determinant of A is (2)(5) - (-1)(0) = 10; the determinant of B is k^2 x det(A) = 9 x 10 = 90.

What is scalar multiplication of a matrix?

Scalar multiplication means multiplying every element of a matrix by a single real number called the scalar. If A is an m x n matrix and k is any real number, then B = kA is an m x n matrix where each entry B[i,j] = k times A[i,j]. The size of the matrix never changes, and no element interacts with any other during this operation. Scalar multiplication is one of the two foundational matrix operations (the other being matrix addition), and together they define the structure of a vector space, which is the starting point for all of linear algebra.

How to multiply a matrix by a scalar - the step-by-step method

The process is straightforward for any matrix size:

  1. Write down your scalar k and matrix A.
  2. Create a new blank matrix B with the same dimensions as A.
  3. For each position (i, j), compute B[i,j] = k x A[i,j].
  4. Repeat for every element until B is complete.

For a 2x2 matrix you perform 4 multiplications. For a 3x3 matrix, 9 multiplications. In general, an m x n matrix requires m x n multiplications. This calculator handles the 2x2 case with a live step-by-step breakdown. For larger matrices, apply the same rule to every cell: multiply by k.

Effect of scalar multiplication on the determinant and eigenvalues

For a square n x n matrix, the determinant of kA equals k raised to the power n multiplied by the determinant of A: det(kA) = k^n x det(A). For a 2x2 matrix this means det(kA) = k^2 x det(A). Doubling the scalar quadruples the determinant. If the determinant of A is not zero (A is invertible), then kA is also invertible for any non-zero k. Eigenvalues scale linearly: if L is an eigenvalue of A with eigenvector v, then (kA)v = k(Av) = k(Lv) = (kL)v, so kL is the corresponding eigenvalue of kA. The eigenvectors are unchanged.

Practical applications of scalar multiplication

Scalar multiplication appears throughout applied mathematics and engineering. In computer graphics, multiplying a transformation matrix by a scalar scales the entire scene uniformly. In machine learning, gradient descent updates network weights via w = w minus alpha x gradient, where alpha (the learning rate) is a scalar applied to a weight matrix. In physics, multiplying a rotation or inertia matrix by a constant models material property changes. In statistics, covariance matrices are scaled when changing measurement units. Whenever you need to apply a constant gain or conversion factor across an entire matrix of values, scalar multiplication is the right operation.

Key properties of scalar multiplication

PropertyFormulaWhat it means
Associativity(jk)A = j(kA)Combine scalars first or apply one at a time
Distributive over matrix additionk(A + B) = kA + kBScalar distributes across matrix addition
Distributive over scalar addition(j + k)A = jA + kASum of scalars applied to A equals sum of scaled matrices
Multiplicative identity1 x A = AMultiplying by 1 leaves the matrix unchanged
Zero scalar0 x A = 0Multiplying by 0 produces the zero matrix
Determinant (2x2)det(kA) = k^2 x det(A)Determinant scales by k squared for a 2x2 matrix
Determinant (nxn)det(kA) = k^n x det(A)Determinant scales by k to the power n for an nxn matrix
Eigenvalue scalingeigenvalues of kA = k x eigenvalues of AEach eigenvalue is multiplied by k; eigenvectors stay the same

These identities hold for any matrices A and B of the same size and scalars j and k.

Frequently asked questions

How do you multiply a matrix by a scalar?

Multiply every element of the matrix individually by the scalar. For a 2x2 matrix [[a, b], [c, d]] and scalar k, the result is [[ka, kb], [kc, kd]]. No element interacts with any other; you just scale each one by k.

Does multiplying a matrix by a scalar change its size?

No. The result always has the same number of rows and columns as the original matrix. Scalar multiplication only scales the values inside the matrix.

What happens to the determinant when you multiply a matrix by a scalar?

For an n x n matrix, det(kA) = k^n x det(A). For a 2x2 matrix, scaling by k multiplies the determinant by k squared. Multiplying by any non-zero scalar preserves invertibility: if A is invertible, so is kA.

What happens to the eigenvalues when you multiply a matrix by a scalar?

Each eigenvalue is multiplied by k. If L is an eigenvalue of A, then kL is the corresponding eigenvalue of kA. The eigenvectors are unchanged because the scalar stretches the transformation uniformly in all directions.

Can you divide a matrix by a scalar?

Yes. Dividing by a non-zero scalar k is the same as multiplying by 1/k. Every element is divided individually. Division by zero is undefined.

What is the result when you multiply a matrix by zero?

You get the zero matrix: a matrix of the same dimensions where every element is 0. The zero matrix is the additive identity for matrix addition, meaning A + 0 = A for any matrix A of matching size.

Is scalar multiplication the same as matrix multiplication?

No. Scalar multiplication multiplies every element of a matrix by a single number. Matrix multiplication multiplies two matrices using dot products of rows and columns, requires compatible dimensions (the number of columns in the first matrix must equal the number of rows in the second), and is generally not commutative. Scalar multiplication has no size constraint and is always commutative: kA = Ak.

How does scalar multiplication work for non-square matrices?

Exactly the same way: multiply every element by the scalar. A 2x3 matrix multiplied by k gives a 2x3 result matrix where all 6 elements are scaled by k. The rule B[i,j] = k x A[i,j] applies regardless of the matrix shape.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…