This note is the point where matrices stop being only containers and start behaving like algebraic objects. Addition, subtraction, and scalar multiplication are computationally simple, but their definitions establish the structure used throughout linear algebra. The important work is therefore not just obtaining an answer: it is checking that the operation is defined, tracking the matrix size, and understanding why familiar algebraic laws remain valid.
Why matching positions matter
A matrix records quantities in named row-and-column positions. For example, rows may represent products and columns may represent months. Adding two such tables is meaningful only when the positions describe the same kind of data. Algebra expresses that requirement by insisting that the matrices have exactly the same size and that their entries are scalars from a common field.
Once those conditions are fixed, the operations are entrywise:
- addition combines entries in matching positions;
- subtraction measures the entrywise change from one matrix to another;
- scalar multiplication applies one common scale factor to every entry.
Concept lensStructural
One position at a time
In an entrywise operation, the output at position uses only the input entries at that same position. This explains both the same-size requirement and why the output retains that size: every position has a corresponding position in each input. A proof can therefore fix one arbitrary position and use ordinary scalar algebra there.
Matrix multiplication will use a different rule: an output entry combines a whole row of one matrix with a whole column of the other. Two matrices can be added, but their matrix product is undefined. The shape check must follow the particular operation; two matrices being acceptable inputs for addition says nothing by itself about their suitability for multiplication.
Define the entrywise operations
Definition
Matrix equality
Let and . The equation means both that and have the same size and that
for every permitted row index and column index . Matching a few entries is not enough; equality is an entry-by-entry statement over the whole matrix.
Fix positive integers and a scalar field , usually in this course. Write for the set of all matrices whose entries belong to . Saying that matrices and scalars use the same field prevents an undeclared mixture of number systems. If a real matrix is to be placed in a larger number system, that common field must first be chosen.
Definition
Matrix addition, subtraction, and scalar multiplication
Suppose and are both in , and let .
- The sum is the matrix defined by .
- The scalar multiple is the matrix defined by .
- The additive inverse is , and subtraction is .
Addition and subtraction are undefined when the two matrices have different sizes. Scalar multiplication always preserves the size of its matrix.
Definition
Zero matrix
The zero matrix in , denoted here by , is the matrix whose every entry is zero. Its size is part of its identity: a zero matrix and a zero matrix are different objects.
The notation makes the entrywise rules compact. If and , then
These three formulas also provide a reliable equality test: to prove two matrix expressions equal, verify that they have the same size and then compare their arbitrary entries.
Linear combinations and closure
The three operations are often used together. If belong to and belong to , then
is called a linear combination of and . Its entry is , and its size is still . The conclusion that the result remains in is called closure. Closure is not merely a vocabulary item: it assures us that a calculation made from allowed objects does not suddenly leave the collection we are studying.
Several familiar expressions are special linear combinations. The difference uses coefficients and ; over , an average such as uses coefficients that sum to one; and can be written as . The coefficients may be positive, negative, or zero. “Scaling” therefore does not always mean making entries physically larger: a negative coefficient also reverses signs, and the coefficient zero collapses every entry to zero.
The same-size condition still governs the entire expression. If is and is , then is undefined even though and are individually defined. Scalar multiplication cannot repair a dimension mismatch. Likewise, the scalars and matrix entries must be read in the chosen common field so that every scalar product and sum has an agreed meaning.
A useful hand-calculation habit is to write the dimensions beside the symbols before doing any arithmetic. Then copy the matrix brackets with the intended output size and fill one position at a time. This separates a structural check from the numerical work: if the dimensions fail, stop before computing; if they pass, each output position has one unambiguous recipe. For a final check, compare a corner entry and any entry involving a negative number against the original expression. Those positions often expose a shifted column or a lost sign. This routine becomes especially valuable when several additions and scalar multiples appear in one expression, because correct scalar arithmetic cannot rescue entries that were paired with the wrong positions.
Algebraic laws at a fixed matrix size
Theorem
Laws of matrix addition
Let . Then
and
Therefore matrices of one fixed size over one fixed field are closed under addition and form a commutative additive system with a unique zero matrix and a unique additive inverse for each matrix.
Theorem
Laws of scalar multiplication
Let and let . Then
Consequently,
The two distributive laws are different: the first distributes one scalar over a matrix sum, whereas the second distributes a sum of scalars over one matrix.
Prove the laws one entry at a time
Every law above follows from the corresponding scalar law, but a matrix proof must explicitly pass through its entries. First note that both sides of each identity are matrices. Fix an arbitrary position .
For associativity of addition,
The middle equality is associativity in . Because this holds at every position, matrix equality gives .
For distribution of a scalar over a matrix sum,
Likewise,
and
Commutativity, the zero law, the inverse law, and follow by replacing the arbitrary entry with the matching scalar identity. This is a reusable proof method: same size plus equality of every arbitrary entry proves equality of matrices.
Consequences and cancellation
The two theorems let us derive useful rules instead of memorizing them as new facts. Because , distribution gives
Indeed, , as can be checked at an arbitrary entry. Be careful, however: subtraction itself is generally neither commutative nor associative. Usually , and need not equal . Rewriting every subtraction as addition of an inverse reveals the correct parentheses and signs.
Addition also has a cancellation law. If belong to the same and satisfy , add to both sides. Associativity and the zero law reduce the equation to . For fixed , the equation in the unknown therefore has the unique solution . This justifies additive “moving to the other side”; it is shorthand for applying the same permitted operation to both sides.
Scalar cancellation needs a condition that additive cancellation does not. If and , multiplication by the scalar gives . If , both sides equal for every pair , so no equality between the original matrices follows. Similarly, implies only when is nonzero. Stating this hypothesis prevents a common logical error.
Finally, over , a matrix equation is really a system of scalar equations in matching positions. If and , then every entry satisfies . Solving these scalar equations simultaneously yields . The compact matrix manipulation and the entrywise method are not rival techniques; they are two descriptions of exactly the same reasoning.
Compare the entrywise operations
The following sequence keeps the row-and-column positions fixed as addition, subtraction, and scalar multiplication change their entries. Compare the zero matrix and additive inverse in the same positions before trying a calculation.
Follow same-size compatibility, entrywise addition, scalar scaling, subtraction by additive inverse, and the zero-matrix identity move in one short sequence.
Same-size gate
A + B and A - B require A and B to have the same m x n size, so every entry has a corresponding partner.
Entrywise addition
The output entry at position (i,j) is built from the two input entries in that same position: [A+B]_{ij}=a_{ij}+b_{ij}.
Scalar multiplication
A scalar multiplies every entry of A. The entries change, but the result is still an m x n matrix.
Subtraction via inverse
Subtraction is defined as A - B = A + (-B), so it uses the same size rule as addition.
Zero and inverse
The zero matrix O and the additive inverse -A must have the same size as A, so A+O=A and A+(-A)=O are well-defined.
Entrywise laws
The familiar algebraic laws are proved by checking the (i,j)-entry on both sides of the proposed matrix equality.
For addition and subtraction, the size match is part of the definition. For scalar multiplication, one scalar reaches every entry while the matrix shape stays fixed.
Try a linear combination
The live block below lets you switch among , , and . Before reading its output, predict one selected entry and the size of the result. No matter which operation you choose, the output keeps the same size as the input matrix or matrices.
Read and try
Compare entrywise matrix operations
The live lab keeps fixed same-size matrices A and B in view, then displays A+B, A-B, and cA so readers can check the entrywise rule against each output cell.
Matrix A
| 1 | -2 |
| 3 | 0 |
B
| 4 | 1 |
| -1 | 2 |
A + B
| 5 | -1 |
| 2 | 2 |
A - B
| -3 | -3 |
| 4 | -2 |
| 2 | -4 |
| 6 | 0 |
Addition and subtraction are entrywise. Scalar multiplication multiplies every entry by the same scalar, so the matrix size stays unchanged.
Calculate with shapes and signs
Worked example
A rectangular numerical calculation
Let
Both matrices are over , so their sum and difference are defined. Keeping the layout visible gives
and
Finally,
All three results remain ; the scalar changes signs and magnitudes, not dimensions.
Worked example
Solve a matrix equation entrywise
Suppose the matrices have real entries and
where
Matrix algebra permits the same additive rearrangement as scalar algebra:
Now compute rather than treating the fraction as “matrix division”:
so
Verification is part of the solution:
Worked example
Verify a distributive law numerically
Take
The left-hand side of is
The right-hand side is
One example does not prove the theorem, but it checks the arithmetic and shows how the general entrywise proof manifests in a concrete case.
Why the zero matrix matters
If is the zero matrix of the same size as , then . This matters later because the vector space of matrices needs an additive identity. That identity depends on the size: a zero matrix cannot replace a zero matrix in an equality or addition.
The equation also has exactly one solution, namely . To see uniqueness, add to both sides and use associativity. Thus the zero matrix and additive inverse are structural objects, not merely convenient notation.
Common mistakes
Common mistake
Checking entries but forgetting dimensions
The expressions and require equal numbers of rows and equal numbers of columns. Having the same total number of entries is insufficient: a matrix cannot be added to a matrix.
Common mistake
Applying a scalar to only part of a matrix
In , the scalar multiplies every entry, including zeros and negative entries. For example, ; losing this sign is a common arithmetic error.
Common mistake
Treating a scalar as a matrix addend
In this course, an expression such as is not defined. Do not add to every entry or only to diagonal entries unless a separate convention has been explicitly introduced.
Common mistake
Calling scalar multiplication matrix division
The step from to is multiplication by the scalar . It does not assert that division by a matrix is available.
The rules to carry forward
- Matrix equality requires the same dimensions and equality at every corresponding entry.
- Addition and subtraction require matrices in the same ; scalar multiplication preserves that space.
- The zero matrix and supply the additive identity and additive inverse.
- Addition and scalar multiplication obey their familiar laws because each law holds at an arbitrary entry in the scalar field.
- For reliable calculations, check dimensions first, keep positions aligned, compute every entry, and substitute back when solving a matrix equation.
Exercises
Checkpoint
Why is matrix addition only defined for matrices of the same size?
Answer in one sentence using the phrase “corresponding entries.”
Solution · Answer
Matrix addition is entrywise, so each entry of one matrix must have a corresponding entry in the other matrix; this requires equal row and column counts.
Checkpoint
If is a matrix, what is the size of ?
Focus on shape, not on the signs of the entries.
Solution · Answer
is still a matrix because multiplication by changes every entry but does not change the number of rows or columns.
Checkpoint
Let be and be . Which of , , and are defined?
State each one separately.
Solution · Guided solution
is undefined because the sizes do not match. is undefined for the same reason. is defined and is because scalar multiplication needs only one matrix and one scalar.
Checkpoint
Compute for and .
Write first, and then subtract corresponding entries.
Solution · Guided solution
Both matrices are , so the expression is defined. We obtain
and hence
Checkpoint
Solve when and .
Isolate , compute it, and check one entry of the original equation.
Solution · Guided solution
Subtract from both sides:
For example, the entry checks as , matching the entry of ; computing the other three entries gives the full equality.
Checkpoint
Why is the zero matrix called the additive identity?
Use the equation that expresses its identity role and state the size condition.
Solution · Guided solution
For every , the zero matrix satisfies . The matrices must have the same size so that the additions are defined.
Related notes
Read 2.1 Matrix basics first if you want a slower introduction to rows, columns, entries, and matrix size.
Read 3.2 Matrix multiplication, identity matrices, and linear systems next to study the first matrix operation that is not entrywise.