Canadian flagMath101 · Independent Ontario learning libraryCreated and edited by Kamran
Linear AlgebraUniversity3 min read

Matrix Operations

A rigorous guide to matrix addition, scalar multiplication, transpose, powers, and operation laws.

Cheat sheet

Precise definition

Matrices of the same size add entrywise: $(A+B)_{ij}=a_{ij}+b_{ij}$. Scalar multiplication is $(cA)_{ij}=ca_{ij}$. The transpose $A^T$ switches rows and columns, so $(A^T)_{ij}=a_{ji}$. Matrix powers $A^k$ use repeated multiplication and require a square matrix.

Notation and mathematical language

Valid identities include $(A+B)^T=A^T+B^T$, $(AB)^T=B^TA^T$, and $A^0=I$ for square $A$. Entrywise or Hadamard multiplication $A\circ B$ is a separate operation and must not be confused with matrix multiplication.

Conceptual picture

Addition combines corresponding effects, scalar multiplication rescales them, and transpose reverses the input/output roles of a matrix relative to the Euclidean inner product. Shapes are a type system that prevents meaningless combinations.

Conditions and key results

Addition requires identical dimensions. Products and transposes alter shapes, so algebraic expressions must be dimensionally checked. Familiar scalar identities such as $(A+B)^2=A^2+2AB+B^2$ require $AB=BA$; in general the middle terms are $AB+BA$.

A reliable strategy

  1. Annotate every matrix with its dimensions before combining expressions.
  2. Apply addition, scaling, or transpose entrywise, preserving indices.
  3. For products and powers, use matrix multiplication and maintain factor order.
  4. Check the resulting shape and test identities entrywise or on a vector.

Fully worked example

Interpretation and application

Matrix operations support data transformations, covariance calculations, graphics, and linear models. An operation can be syntactically valid but contextually meaningless, so mathematical interpretation should accompany shape checks.

Common mistakes

Verification and reasonableness

  • Check selected entries from the defining index formulas.
  • Verify transpose shape and the identity $(A^T)^T=A$.
  • Expand matrix powers by ordered products and compare on a test vector.

Practice

  1. What is the size of $A^T$ if $A$ is $2\times5$?
  2. What is $(AB)^T$?
  3. When may $AB+BA$ equal $2AB$?
Answers and brief solutions
  1. $5\times2$.
  2. $B^TA^T$.
  3. When $A$ and $B$ commute.

Further deduction

Symmetric and skew-symmetric parts decompose any real square matrix: $A=\tfrac12(A+A^T)+\tfrac12(A-A^T)$. The first term is symmetric and the second skew-symmetric. The decomposition is unique and separates quadratic-form behaviour from rotational components, illustrating how basic operations reveal structure.

Trace is linear and invariant under cyclic factor movement: $\operatorname{tr}(A+B)=\operatorname{tr}A+\operatorname{tr}B$ and $\operatorname{tr}(AB)=\operatorname{tr}(BA)$ for compatible square products. This does not mean $AB=BA$. A scalar summary may agree even when the matrices differ substantially.

Element-wise multiplication, often written $A\circ B$, differs from matrix multiplication. It requires equal shapes and multiplies corresponding entries, whereas $AB$ composes linear maps and contracts an inner dimension. Software libraries may use * for either operation depending on the language, so mathematical intent and dimensions must be checked. Confusing the two can produce a correctly shaped numerical array with entirely different algebraic properties, especially in data and graphics code.

Explore the idea

Vector and matrix transform

Change one quantity at a time and connect what moves to Matrix Operations.

Works offline
A vector before and after a matrix transformationThe vector 2,1 is transformed to 3,1 by the displayed matrix.
What the model is showing Static example: [[1, 1], [0, 1]][2, 1] = [3, 1]. The determinant is 1, so oriented area is preserved and the transform is invertible.Open the 2×2 system workbench →
Check your understanding

Try it yourself

Hints are part of learning. Open one whenever it makes the next step feel possible.

1 practice question
Question 1Transpose a shape · Standard

If $A$ is $4\times7$, how many rows does $A^T$ have?

End of lesson

Nice work making it this far.

Understanding grows through return visits. Save this lesson, try the practice, or continue when you are ready.

Lesson complete

That one is yours now.

Matrix Operations is saved to My Learning. Take the win—you earned it.

1Your Math101 collectionlesson completed
Search 464 published lessons, 123 answer guides, courses, and learning tools.
Your experience

Settings

Ontario math tutoringWork with KamranBook ↗