Matrix operations
Matrix Addition
For matrices A and B of the same dimensions m × n:
- (A + B)ᵢⱼ = Aᵢⱼ + Bᵢⱼ
- Add corresponding elements
- Example:
[a b] [e f] [a+e b+f] [c d] + [g h] = [c+g d+h]
Scalar Multiplication
For a scalar k and a matrix A:
- (kA)ᵢⱼ = k × Aᵢⱼ
- Multiply each element by k
- Example:
2 × [3 1] [6 2] [4 2] = [8 4]
Matrix Multiplication
For matrices A (m × n) and B (n × p):
- (AB)ᵢⱼ = Σₖ₌₁ⁿ Aᵢₖ × Bₖⱼ
- Multiply row i of A by column j of B
- Dimensions must be compatible: columns of A = rows of B
- Result is a matrix of size m × p
- Example:
[a b] [e f] [ae+bg af+bh] [c d] × [g h] = [ce+dg cf+dh]
Dot Product View of Matrix Multiplication
- Each entry (i,j) in the product is the dot product of row i from the first matrix and column j from the second matrix.
Properties of Matrix Multiplication
- Not commutative: AB ≠ BA generally
- Associative: (AB)C = A(BC)
- Distributive: A(B + C) = AB + AC and (A + B)C = AC + BC
- Identity: AI = IA = A, where I is the identity matrix
Matrix Transpose
For a matrix A:
- (A^T)ᵢⱼ = Aⱼᵢ
- Reflect elements across the main diagonal
- Example:
[a b c]^T [a d] [d e f] = [b e] [c f]
Properties of Transpose
- (A^T)^T = A
- (A + B)^T = A^T + B^T
- (AB)^T = B^T A^T (note the order reversal)
- (kA)^T = k(A^T)
Entry Notation
- Aᵢⱼ is the element in row i, column j of matrix A
- A(i) is the i-th row of matrix A
- A^(j) is the j-th column of matrix A
Special Matrices
Identity Matrix
- Has 1s on the main diagonal and 0s elsewhere
- Denoted by I or Iₙ for an n × n matrix
- AI = IA = A for any matrix A of compatible dimensions
Zero Matrix
- All elements are 0
- Denoted by 0 or 0ₘₙ for an m × n matrix
- A + 0 = 0 + A = A
- A × 0 = 0 × A = 0
Diagonal Matrix
- All non-diagonal elements are 0
- Denoted by diag(d₁, d₂, …, dₙ)
- Special case: scalar matrix where all diagonal entries are equal
Triangular Matrices
- Upper triangular: all elements below the main diagonal are 0
- Lower triangular: all elements above the main diagonal are 0
Matrix Powers
For a square matrix A:
- A² = A × A
- A³ = A × A × A = A² × A
- A⁰ = I (identity matrix)
Examples for Your Exercises
Example 1: Matrix Addition and Scalar Multiplication
For matrices A = [2 1; 3 0; 1 4] and B = [1 2; 0 1], the expression A(B + C) requires:
- Calculate B + C first
- Then multiply A by the result
- Make sure the dimensions are compatible
Example 2: Computing (A^T + C)B
- Calculate A^T
- Add C to A^T
- Multiply the result by B, checking compatibility
Example 3: Computing a Specific Matrix Entry
To find the entry (2,3) of M² where M = [1 0 0; 0 1 2; 0 1 1]:
- Calculate M² = M × M
- Then identify the element in row 2, column 3
Example 4: Computing M·M^T
For M = [1 0 0; 0 1 2; 0 1 1]:
- Calculate M^T
- Multiply M by M^T
Example 5: Calculating Matrix Expressions
For expressions like 3A · (2B + 4C^T):
- Calculate 2B
- Calculate 4C^T
- Add them to get (2B + 4C^T)
- Calculate 3A
- Multiply 3A and (2B + 4C^T)
Example 6: Matrix Polynomials
For expressions like A² - B² or (A - B) · (B + A):
- Calculate A² and B² separately
- For (A - B) · (B + A), first calculate (A - B) and (B + A), then multiply
Solving Technique for Matrix Calculations
- Always check matrix dimensions before operations
- For complex expressions, work from inside parentheses outward
- Use associativity to efficiently calculate matrix powers
- Break down calculations into smaller steps
- Keep track of intermediate results clearly
Common Mistakes to Avoid
- Assuming matrix multiplication is commutative
- Forgetting to check dimensions
- Incorrect order of operations in complex expressions
- Errors in calculating individual entries in matrix products
- Forgetting to apply the transpose correctly in expressions like (AB)^T
Exercises
- Given the following matrices:
compute the following expressions:
- Given the following matrices:
compute the following expressions:
-
Determine the entry of where
-
Determine where
-
Determine the product, if it is possible, of the following two matrices:
-
Given the following matrices: compute and .
- Calculate the following matrix operations:
- where , and are given matrices
- Calculate where:
- ,
- Calculate the following matrix expressions:
- and where
- where , and are given matrices
- and where and
- and where and are given matrices
- where and are given matrices