MatrixCalc

Scalar multiplication calculator

Multiply a matrix by a number — every entry scaled by k, including negatives and fractions. Shows how scaling a matrix scales its determinant by k to the power n.

Matrix A
rows: 3
cols: 3
Matrix B
rows: 3
cols: 3
Operations
Result
Pick an operation to see the result here. Errors will show up in this area.

Tips: adjust sizes (max 50×50). For A×B, cols(A)=rows(B). det/inverse/trace/power require square matrices.

React, Tailwind & shadcn/ui. No external math deps. — English

Scalar multiplication scales every entry of a matrix by the same number. Type a value for k above and press k·A. Negatives, decimals and fractions all work.

What scaling does

Unlike matrix multiplication, this operation has no shape requirement at all: any matrix can be multiplied by any number, and the dimensions are unchanged. As a transformation it stretches space uniformly in every direction by a factor of k, and a negative k adds a reflection through the origin.

One consequence surprises almost everyone the first time. Scaling a matrix does not scale its determinant by k. For an n×n matrix, det(k·A) = kⁿ · det(A), because each of the n rows is being scaled and the determinant is multiplied once for each. Doubling a 3×3 matrix multiplies its determinant by eight. The trace, being a plain sum, behaves as expected: tr(k·A) = k · tr(A). And the rank is untouched for any non-zero k — scaling cannot make dependent rows independent.

Worked example

3 ·
12
04
=
36
012

Every entry is tripled, zeros included. The determinant went from 4 to 36 — a factor of 3² = 9, not 3, exactly as the rule predicts for a 2×2.

Common mistakes

  • Scaling only the diagonal. k·A multiplies every entry. Scaling the diagonal alone is a different operation entirely.
  • Assuming det(k·A) = k·det(A). The exponent is the size of the matrix: det(k·A) = kⁿ·det(A).
  • Confusing k·A with A + k. Adding a number to a matrix is undefined; scaling by it is not.
  • Multiplying by zero and expecting the identity. 0·A is the zero matrix. The identity is what you get from A⁰.

Frequently asked questions

Can I multiply any matrix by a scalar?
Yes. Unlike matrix multiplication, scaling has no dimensional requirement and works on any shape, leaving the dimensions unchanged.
How does scaling affect the determinant?
For an n×n matrix, det(k·A) = kⁿ·det(A). Each of the n rows is scaled, and the determinant picks up a factor of k for each one.
What happens when k is negative?
Every entry flips sign. Geometrically the transformation is reflected through the origin as well as scaled by the magnitude of k.
Does scaling change the rank?
No, as long as k is not zero. Multiplying by a non-zero number cannot turn dependent rows into independent ones. Multiplying by zero gives the zero matrix, whose rank is 0.

Want the full explanation? Read the guide: How matrix multiplication works

Other calculators