Matrix Operations and Vectors
Flashcards
- What requirement must be met to multiply two matrices A and B?
- The number of columns of matrix A must be equal to the number of rows of matrix B.
- What is the resulting dimension when multiplying an m × n matrix by an n × p matrix?
- The product matrix has size m × p.
Multiple-choice questions
- When is the product AB defined for matrices A and B?
- a) When both matrices are square
- b) When both have the exact same dimensions
- c) When columns of A equal rows of B
- d) When rows of A equal columns of B
Answer: c) When columns of A equal rows of B. Matrix multiplication requires the inner dimensions to match: columns of A must match rows of B.
- What is the dot product of [3, -1, 4] and [1, 2, -3]?
- a) -11
- b) 11
- c) -7
- d) 5
Answer: a) -11. 3(1) + (-1)(2) + 4(-3) = 3 - 2 - 12 = -11.
- Which property does NOT hold in general for matrix multiplication?
- a) Associative property
- b) Compatibility with scalars
- c) Distributive over addition
- d) Commutative property
Answer: d) Commutative property. Matrix multiplication is not commutative in general: AB and BA are typically different.
Identity Matrix, Determinants, and Invertibility
Flashcards
- What is the determinant of beginbmatrix 3 & 4 \\ 1 & 2 endbmatrix?
- (3)(2) - (4)(1) = 6 - 4 = 2.
- What is the condition for a matrix to be singular?
- A square matrix is singular when its determinant equals zero, meaning it has no inverse.
Multiple-choice questions
- Under what condition is a square matrix A invertible?
- a) det(A) is strictly positive
- b) All entries of A are non-zero
- c) det(A) is equal to zero
- d) det(A) is not zero
Answer: d) det(A) is not zero. A square matrix is invertible if and only if its determinant is non-zero.
- What is the determinant of a 1x1 matrix [5]?
- a) 5
- b) -5
- c) 1
- d) 0
Answer: a) 5. By definition, the determinant of a 1x1 matrix [a11] is simply the entry itself, a11.
- In the 2x2 inverse formula, what happens to the main diagonal entries?
- a) They change signs only
- b) They remain unchanged
- c) They swap places
- d) They become zero
Answer: c) They swap places. In the 2x2 formula, entries a and d swap positions, while b and c change signs.
Linear Systems and Row Reduction
Flashcards
- What are the three allowable elementary row operations?
- Interchanging two rows, multiplying a row by a non-zero scalar, and adding a multiple of one row to another row.
- What is the difference between REF and RREF?
- In REF, pivots only need to be to the right of the one above. In RREF, every pivot must equal 1 and be the only non-zero entry in its entire column.
Multiple-choice questions
- Which operation is NOT an elementary row operation?
- a) Swapping two rows
- b) Multiplying a row by zero
- c) Scaling a row by a non-zero number
- d) Adding a multiple of one row to another
Answer: b) Multiplying a row by zero. Scaling a row by zero destroys information and is not a permitted elementary row operation.
- What characterizes a system of equations as inconsistent?
- a) The coefficient matrix is square
- b) It has no solutions
- c) It has infinitely many solutions
- d) It has exactly one solution
Answer: b) It has no solutions. By definition, an inconsistent linear system is one that possesses no solution.
- In reduced row echelon form, what must every pivot entry be?
- a) Equal to 0
- b) Equal to 1
- c) Any non-zero real number
- d) Any positive integer
Answer: b) Equal to 1. A defining condition of RREF is that all leading coefficients (pivots) are normalized to 1.
And 0 more flashcards and 3 more questions in the document.
Document text
APUNTES MATRICES AND VECTORS Bachelor's Degree in Mathematics University of Barcelona AprenAI 2026-2027 Complete study notes on matrix operations, determinants, matrix inverses, and solving linear systems using Gauss-Jordan row reduction.
APREN.AI Contents 1 Matrix Operations and Vectors Basic Concepts and Dimensions Matrix Addition and Scalar Multiplication The Dot Product of Vectors Matrix Multiplication 2 Identity Matrix, Determinants, and Invertibility The Identity Matrix Matrix Invertibility and Singularity Determinants and the Invertibility Criterion Cofactor Expansion Procedure Direct Inverse Formula for 2x2 Matrices 3 Linear Systems and Row Reduction Matrix Representation of Linear Systems Elementary Row Operations Row Echelon and Reduced Row Echelon Forms Gauss-Jordan Elimination Example Matrix Inversion via Row Reduction 4 Formula Sheet Matrix Operations and Vectors Determinants and Inverses Linear Systems and Gauss-Jordan Elimination Common Errors Answers to the review questions These notes may contain errors or omissions.
They are study support and do not replace the official syllabus or your teachers: check important information. Matrices and Linear Systems: Operations and Reduction 1 1 Matrix Operations and Vectors BY THE END YOU WILL BE ABLE TO Perform scalar multiplication and addition on compatible matrices Compute the dot product of two vectors Multiply compatible matrices and recognize non-commutativity THINK BEFORE YOU READ 1 If you can compute A times B, can you always compute B times A? Basic Concepts and Dimensions A matrix is a rectangular array of numbers arranged in horizontal rows and vertical columns. We denote its size as . The entry located in the -th row and -th column is written as .
DEFINITION A column vector is a matrix of dimension , whereas a row vector has dimension . The vector consisting entirely of zeros is denoted by . Matrix Addition and Scalar Multiplication Matrices of identical size can be combined entry by entry. When multiplying a matrix by a real number (a scalar), each component is multiplied by that number. Operation Condition Formula / Rule Scalar multiplication Any matrix , scalar Matrix addition Same dimensions ( ) Linear combination Same dimensions ( ) Matrix addition satisfies three essential algebraic laws: it is commutative ( ), associative ( ), and distributive with scalar multiplication ( ). CHECK 2 Can you add a 2x3 matrix and a 3x2 matrix?
The Dot Product of Vectors Given two length- vectors and , their dot product produces a single scalar by summing the element-wise products: m n m × n i j a ij m × 1 1 × n 0 A k (kA) = ij k a ij m × n (A + B) = ij a + ij b ij m × n (c A + 1 c B) = 2 ij c a + 1 ij c b 2 ij A + B = B + A (A + B) + C = A + (B + C) k(A + B) = kA + kB m u v Matrices and Linear Systems: Operations and Reduction 2 EXAMPLE Let and . Their dot product is computed as: Matrix Multiplication Multiplication between two matrices and is defined if and only if the number of columns in matches the number of rows in . If is of size and is of size , the product has size .
COMMON MISTAKE Assuming that matrix multiplication is commutative. Even when both products and exist and have identical dimensions (as with square matrices), in general AB BA. Furthermore, if dimensions do not align, one product may exist while the other is undefined. EXAMPLE Consider the matrices and . The product is: Conversely, computing gives: This demonstrates that . CHECK 3 For matrix A of size 2x2 and matrix C of size 2x3, can you compute AC and CA?
u = v u v = i=1 m i i u v + 1 1 u v + 2 2 + u v m m = u 3 1 4 = v 1 2 3 u = v (3)(1) + ( 1)(2) + (4)( 3) = 3 2 12 = 11 A B A B A m × n B n × p C = AB m × p c = ij row (A) i column (B) = j a b k=1 n ik kj AB BA = A = [ 2 1 3 5 ] B = [ 13 4 9 0 ] AB AB = = [ 2(13) + ( 3)(4) 1(13) + 5(4) 2(9) + ( 3)(0) 1(9) + 5(0) ] [ 14 7 18 9 ] BA BA = = [ 13(2) + 9( 1) 4(2) + 0( 1) 13( 3) + 9(5) 4( 3) + 0(5) ] [ 17 8 6 12 ] AB = BA Matrices and Linear Systems: Operations and Reduction 3 PROCESS Matrix Multiplication Dimension Compatibility 1 Matrix A (m x n) Inner dimension n rep resents the number of columns 2 Check match Columns of A must equal rows of B (both n) 3 Matrix B (n x p) Inner dimension n rep resents the number of rows 4 Product C (m x p) Result takes outer di mensions m rows and p columns KEY IDEAS A matrix is an rectangular grid of numbers.
Matrix addition is only defined for matrices of identical dimensions. The dot product sums the component-wise products of two vectors of equal length. Matrix multiplication requires the number of columns in to equal the number of rows in . Matrix multiplication is generally non-commutative ( ). CHECK YOUR UNDERSTANDING 4. What requirement must be met to multiply two matrices and ? 5. What is the resulting dimension when multiplying an matrix by an matrix? Quiz Circle the correct answer. The answers are at the end. 6. When is the product AB defined for matrices A and B? 7. What is the dot product of [3, -1, 4] and [1, 2, -3]? 8.
Which property does NOT hold in general for matrix multiplication? m × n AB A B AB = BA A B m × n n × p When both matrices are square a) When both have the exact same dimensions b) When columns of A equal rows of B c) When rows of A equal columns of B d) -11 a) 11 b) -7 c) 5 d) Associative property a) Compatibility with scalars b) Distributive over addition c) Commutative property d) Matrices and Linear Systems: Operations and Reduction 4 9. What is the shape of a column vector with m elements?
2 Identity Matrix, Determinants, and Invertibility BY THE END YOU WILL BE ABLE TO State the definition and properties of the identity matrix Calculate determinants of 2x2 and 3x3 matrices using cofactor expansion Determine matrix invertibility and compute the inverse of a 2x2 matrix THINK BEFORE YOU READ 10 Can every square matrix be inverted, just like every non-zero number can be inverted? The Identity Matrix The identity matrix of size is a square matrix with ones along the main diagonal and zeros in every other position: For any compatible matrix sizes, multiplying by leaves the matrix unchanged: and .
Matrix Invertibility and Singularity DEFINITION A square matrix of size is invertible (or nonsingular) if there exists a matrix of the same size such that: In this case, we write . If no such inverse exists, is termed singular. Determinants and the Invertibility Criterion The determinant is a scalar value assigned to any square matrix. For a scalar matrix , the determinant is simply . For a matrix, the determinant is calculated directly: m x 1 a) m x m b) 1 x 1 c) 1 x m d) I m × m I = 1 0 0 0 1 0 … … …
0 0 1 I IA = A BI = B A m × m B AB = BA = I B = A 1 A 1 × 1 [a ] 11 a 11 2 × 2 Matrices and Linear Systems: Operations and Reduction 5 For general matrices, the determinant is defined recursively via cofactor expansion along any chosen row or column : where is the submatrix formed by deleting row and column . REMEMBER To find determinants quickly, expand along the row or column containing the largest number of zeros to minimize calculations. DEFINITION An matrix is invertible if and only if (A) 0. CHECK 11 If a square matrix has a determinant equal to 0, what does this say about its inverse?
Cofactor Expansion Procedure EXAMPLE Let us compute the determinant of by expanding along row 2: Because , matrix is invertible. Direct Inverse Formula for 2x2 Matrices For a matrix, when , the inverse is given explicitly by swapping diagonal elements and negating off-diagonal elements: det = [ a c b d ] ad bc m × m i j det(A) = ( 1) a det(A ) = j=1 m i+j ij ij ( 1) a det(A ) i=1 m i+j ij ij A ij (m 1) × (m 1) i j m × m A det = Set up a sign checkerboard of size with alternating signs, beginning with at position . 1 m × m + (1,1) Select any row or column. For each entry , construct the submatrix by removing row and column .
2 a ij A ij i j Multiply each entry by its sign and by , then sum all products. 3 a ij ( 1)i+j det(A ) ij A = 2 0 2 1 2 0 0 0 1 det(A) = 0 det(A ) + 21 2 det [ 2 2 0 1 ] 0 det(A ) 23 det(A) = 2 ((2)(1) (0)(2)) = 2 2 = 4 det(A) = 4 = 0 A 2 × 2 ad bc = 0 1 Matrices and Linear Systems: Operations and Reduction 6 COMMON MISTAKE Forgetting to divide by the determinant or confusing the positions: the diagonal elements swap places ( ), while the off-diagonal elements stay in place but change signs ( ). OUTLINE Square Matrix Classification by Invertibility KEY IDEAS The identity matrix acts as the multiplicative neutral element for matrices.
A square matrix has an inverse if and only if its determinant is non-zero. Determinants can be computed recursively using cofactor expansion along any row or column. A 2x2 matrix inverse is obtained by swapping diagonal entries, negating off-diagonal entries, and dividing by the determinant. CHECK YOUR UNDERSTANDING 12. What is the determinant of ? 13. What is the condition for a matrix to be singular? Quiz Circle the correct answer. The answers are at the end. 14. Under what condition is a square matrix A invertible? 15. What is the determinant of a 1x1 matrix [5]?
= [ a c b d ] 1 ad bc 1 [ d c b a ] ad bc a d b, c Square Matrix m x m dimension Invertible det(A) != 0, has inverse Singular det(A) = 0, no inverse [ 3 1 4 2 ] det(A) is strictly positive a) All entries of A are non-zero b) det(A) is equal to zero c) det(A) is not zero d) 5 a) -5 b) 1 c) 0 d) Matrices and Linear Systems: Operations and Reduction 7 16. In the 2x2 inverse formula, what happens to the main diagonal entries? 17. What is the result of multiplying any matrix A by a compatible identity matrix I?
3 Linear Systems and Row Reduction BY THE END YOU WILL BE ABLE TO Translate a linear system into an augmented matrix Apply elementary row operations to reach REF and RREF Compute the inverse of an invertible matrix using row reduction THINK BEFORE YOU READ 18 Can you use the exact same row reduction steps that solve a linear system to invert a matrix? Matrix Representation of Linear Systems A system of linear equations with unknowns can be compactly represented in matrix form: where contains the coefficients, is the vector of unknowns, and contains the constants on the right-hand side. To solve the system, we collect this information into an augmented matrix .
A system is called consistent if at least one solution exists. If no solution exists, the system is inconsistent.
PROCESS Gauss-Jordan Inversion Algorithm 1 Form Augmented Matrix Set up the block ma trix [A " I] 2 Forward Elimination Create zeros below pivots to reach row echelon form 3 Normalize Pivots Scale rows so that all leading entries be come 1 4 Backward Elimination Eliminate entries above pivots to reach [I " A^-1] They change signs only a) They remain unchanged b) They swap places c) They become zero d) Matrix A itself a) The zero matrix b) The identity matrix I c) The inverse matrix d) n n A = x b A x b [A ] b x Matrices and Linear Systems: Operations and Reduction 8 Elementary Row Operations To find the solution set, we manipulate the augmented matrix using three operations that preserve the solutions of the linear system: Row swap: Interchange two rows ( ).
Row scaling: Multiply all entries of a row by a non-zero scalar ( with ). Row addition: Add a multiple of one row to another row ( ). CHECK 19 Do elementary row operations alter the solution set of a linear system? Row Echelon and Reduced Row Echelon Forms The leading coefficient (or pivot) of a non-zero row is its first non-zero entry from the left. DEFINITION A matrix is in row echelon form (REF) if: All rows consisting solely of zeros are placed at the bottom. The leading coefficient of each non-zero row is strictly to the right of the leading coefficient of the row directly above it.
A matrix is in reduced row echelon form (RREF) if, in addition to being in REF: Every leading coefficient is equal to 1. Each leading coefficient is the only non-zero entry in its entire column (entries above and below are 0). COMMON MISTAKE Stopping row reduction at echelon form and assuming it is fully reduced. In REF, entries above pivots can be non-zero; in RREF, every entry above and below every leading 1 must be systematically cleared to zero.
Gauss-Jordan Elimination Example Consider the linear system: R i R j kR i k = 0 R + i kR j 3x + 2x 3x 1 2 3 x 2x + 2x 1 2 3 3x 2x 2x 1 2 3 = 14 = 6 = 1 Write the augmented matrix: 1 3 1 3 2 2 2 3 2 2 14 6 1 Matrices and Linear Systems: Operations and Reduction 9 The unique solution is , , and . Matrix Inversion via Row Reduction Row reduction provides a systematic technique to invert an matrix . Construct the partitioned augmented matrix and apply elementary row operations until the left block becomes the identity matrix: EXAMPLE Let . Set up : Thus, the inverse matrix is .
Interchange to place a 1 in the top-left pivot position: 2 R 1 R 2 1 3 3 2 2 2 2 3 2 6 14 1 Scale and eliminate below the first pivot using and , then , yielding: 3 R 3 1 3 R 3 R 1 R 2 3R 1 1 0 0 2 8 3 4 2 9 3 8 6 32 3 17 Eliminate the second column entry in the third row with to reach row echelon form: From here, .
4 R 3 R 6 1 2 1 0 0 2 8 0 2 9 6 7 6 32 3 1 x = 6 7 3 3 1 x = 3 7 2 Scale rows so pivots become 1 and eliminate upward to obtain reduced row echelon form: 5 1 0 0 0 1 0 0 0 1 14 27 28 103 7 2 x = 1 14 27 x = 2 28 103 x = 3 7 2 n × n A [A I] [A I] row reduce [I A ] 1 A = [ 6 5 8 7 ] [A I] [ 6 5 8 7 1 0 0 1 ] R 6 1 1 [ 1 5 3 4 7 6 1 0 0 1 ] R 5R 2 1 [ 1 0 3 4 3 1 6 1 6 5 0 1 ] 3R2 [ 1 0 3 4 1 6 1 2 5 0 3 ] R R 1 3 4 2 [ 1 0 0 1 2 7 2 5 4 3 ] A = 1 [ 2 7 2 5 4 3 ] Matrices and Linear Systems: Operations and Reduction 10 CHECK 20 How can you verify that the computed matrix inverse is correct? KEY IDEAS A linear system can be represented by the augmented matrix .
Elementary row operations do not alter the solution set of a system. In row echelon form, pivots are staged to the right; in reduced row echelon form, pivots are 1 and columns containing pivots are cleared. An invertible matrix can be inverted using the algorithm . CHECK YOUR UNDERSTANDING 21. What are the three allowable elementary row operations? 22. What is the difference between REF and RREF? Quiz Circle the correct answer. The answers are at the end. 23. Which operation is NOT an elementary row operation? 24. What characterizes a system of equations as inconsistent? 25. In reduced row echelon form, what must every pivot entry be? 26.
What is the right block of [A " I] after Gauss-Jordan reduction to [I " B]?
[A ] b A [A I] [I A ] 1 Swapping two rows a) Multiplying a row by zero b) Scaling a row by a non-zero number c) Adding a multiple of one row to another d) The coefficient matrix is square a) It has no solutions b) It has infinitely many solutions c) It has exactly one solution d) Equal to 0 a) Equal to 1 b) Any non-zero real number c) Any positive integer d) The identity matrix a) The determinant of A b) The transpose of A c) The inverse of matrix A d) Matrices and Linear Systems: Operations and Reduction 11 4 Formula Sheet Matrix Operations and Vectors Formula / Procedure Symbols When to Use : scalar, : matrix of size Multiplying a matrix by a scalar : matrices of matching size Adding two matrices of identical dimensions : vectors of length Dot product of two vectors of equal length ( ), ( ), ( ) Matrix multiplication (columns of must equal rows of ) Determinants and Inverses Formula / Procedure Symbols When to Use : entries of matrix Determinant of a matrix : submatrix removing row and col Cofactor expansion along row or column Direct inversion of an invertible matrix is invertible : square matrix of size Criterion for matrix invertibility (nonsingularity) Linear Systems and Gauss-Jordan Elimination Formula / Procedure Symbols When to Use : coefficients, : unknowns, : constants Matrix representation of a linear system Form swap rows eliminate below pivots (REF) scale pivots to 1 eliminate above pivots (RREF) Row ops: , , Solving linear systems via Gauss-Jordan elimination Form row reduce left block to read : invertible matrix, : identity matrix Matrix inversion using row reduction (kA) = ij k aij k A m × n (A + B) = ij a + ij b ij A, B m × n u = v u v i=1 m i i , u v m c = ij row (A) i col (B) = j a b k=1 n ik kj A m × n B n × p C m × p A B det = [ a c b d ] ad bc a, b, c, d 2 × 2 2 × 2 det(A) = ( 1) a det(A ) j=1 m i+j ij ij A ij i j i j = [ a c b d ] 1 ad bc 1 [ d c b a ] ad bc = 0 2 × 2 det(A) = 0 A A m × m A = x b [A ] b A x b [A ] b R i R j kR i R + i kR j [A I] I [I A ] 1 A n × n I Matrices and Linear Systems: Operations and Reduction 12 Common Errors Non-commutativity: In general, even when both matrices are square.
Dimension mismatch: The product is only valid if the number of columns of equals the number of rows of . Singular matrices: A matrix with has no inverse. AB = BA AB A B det(A) = 0 Matrices and Linear Systems: Operations and Reduction 13 Answers to the review questions 1. No, because the dimensions of B and A might not be compatible for multiplication in reverse order. 2. No. Matrix addition requires both matrices to have the exact same shape (equal number of rows and columns). 3. AC is defined because the columns of A (2) match the rows of C (2), yielding a 2x3 matrix. However, CA is undefined because the columns of C (3) do not match the rows of A (2). 4.
The number of columns of matrix must be equal to the number of rows of matrix . 5. The product matrix has size . 6. c) When columns of A equal rows of B. Matrix multiplication requires the inner dimensions to match: columns of A must match rows of B. 7. a) -11. 3(1) + (-1)(2) + 4(-3) = 3 - 2 - 12 = -11. 8. d) Commutative property. Matrix multiplication is not commutative in general: AB and BA are typically different. 9. a) m x 1. A column vector consists of m rows and a single vertical column (m x 1). 10. No, only matrices with a non-zero determinant have an inverse; those with a determinant of zero are singular. 11. The matrix is singular, meaning its inverse does not exist. 12. . 13.
A square matrix is singular when its determinant equals zero, meaning it has no inverse. 14. d) det(A) is not zero. A square matrix is invertible if and only if its determinant is non-zero. 15. a) 5. By definition, the determinant of a 1x1 matrix [a11] is simply the entry itself, a11. 16. c) They swap places. In the 2x2 formula, entries a and d swap positions, while b and c change signs. 17. a) Matrix A itself. The identity matrix is the multiplicative identity: IA = A and AI = A. 18. Yes, by augmenting the matrix with the identity matrix [A " I] and row reducing until the left side becomes I, the right side becomes the inverse. 19. No.
Elementary row operations transform the matrix into equivalent systems that share the exact same set of solutions. 20. Multiply the original matrix A by the computed inverse A^-1; the result must equal the identity matrix I. 21. Interchanging two rows, multiplying a row by a non-zero scalar, and adding a multiple of one row to another row. 22. In REF, pivots only need to be to the right of the one above. In RREF, every pivot must equal 1 and be the only non-zero entry in its entire column. 23. b) Multiplying a row by zero. Scaling a row by zero destroys information and is not a permitted elementary row operation. 24. b) It has no solutions.
By definition, an inconsistent linear system is one that possesses no solution. 25. b) Equal to 1. A defining condition of RREF is that all leading coefficients (pivots) are normalized to 1. 26. d) The inverse of matrix A. Row reducing [A " I] to [I " B] results in B being the inverse matrix . A B m × p (3)(2) (4)(1) = 6 4 = 2 A 1 Matrices and Linear Systems: Operations and Reduction 14