Comprehensive Exercises on Matrices

Exercises

Exercise 1

Compute A+BA + B, where A=(123456)A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix} and B=(210123)B = \begin{pmatrix} 2 & 1 & 0 \\ 1 & 2 & 3 \end{pmatrix}

matrixmatrix operationsdeterminantmatrix addition

Approach: Use the definition of matrix addition, adding corresponding entries.

Steps:

A+B=(1+22+13+04+15+26+3)=(333579)A + B = \begin{pmatrix} 1+2 & 2+1 & 3+0 \\ 4+1 & 5+2 & 6+3 \end{pmatrix} = \begin{pmatrix} 3 & 3 & 3 \\ 5 & 7 & 9 \end{pmatrix}

Answer: A+B=(333579)A + B = \begin{pmatrix} 3 & 3 & 3 \\ 5 & 7 & 9 \end{pmatrix}

Exercise 2

Compute 2A−3B2A - 3B, where A=(1234)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} and B=(0110)B = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}

matrixmatrix operationsdeterminantmultiplication by a scalar

Approach: First compute the scalar multiples, then carry out the subtraction.

Steps:

2A=(2468),3B=(0330)2A = \begin{pmatrix} 2 & 4 \\ 6 & 8 \end{pmatrix}, \quad 3B = \begin{pmatrix} 0 & 3 \\ 3 & 0 \end{pmatrix}

2A−3B=(2468)−(0330)=(2138)2A - 3B = \begin{pmatrix} 2 & 4 \\ 6 & 8 \end{pmatrix} - \begin{pmatrix} 0 & 3 \\ 3 & 0 \end{pmatrix} = \begin{pmatrix} 2 & 1 \\ 3 & 8 \end{pmatrix}

Answer: 2A−3B=(2138)2A - 3B = \begin{pmatrix} 2 & 1 \\ 3 & 8 \end{pmatrix}

Exercise 3

Compute ABAB and BABA, where A=(1201)A = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} and B=(2013)B = \begin{pmatrix} 2 & 0 \\ 1 & 3 \end{pmatrix}

matrixmatrix operationsdeterminantmatrix multiplication

Approach: Use the definition of matrix multiplication, and verify that matrix multiplication is not commutative.

Steps:

AB=(1201)(2013)=(4613)AB = \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} \begin{pmatrix} 2 & 0 \\ 1 & 3 \end{pmatrix} = \begin{pmatrix} 4 & 6 \\ 1 & 3 \end{pmatrix}

BA=(2013)(1201)=(2415)BA = \begin{pmatrix} 2 & 0 \\ 1 & 3 \end{pmatrix} \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 4 \\ 1 & 5 \end{pmatrix}

Answer: AB=(4613)AB = \begin{pmatrix} 4 & 6 \\ 1 & 3 \end{pmatrix}, BA=(2415)BA = \begin{pmatrix} 2 & 4 \\ 1 & 5 \end{pmatrix}

Note that AB≠BAAB \neq BA, which verifies that matrix multiplication is not commutative.

Exercise 4

Compute ATA^T, where A=(123456789)A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix}

matrixmatrix operationsdeterminant

Approach: Interchange the rows and the columns of the matrix.

Steps:

AT=(147258369)A^T = \begin{pmatrix} 1 & 4 & 7 \\ 2 & 5 & 8 \\ 3 & 6 & 9 \end{pmatrix}

Answer: AT=(147258369)A^T = \begin{pmatrix} 1 & 4 & 7 \\ 2 & 5 & 8 \\ 3 & 6 & 9 \end{pmatrix}

Exercise 5

Decide whether the matrix A=(1234)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} is invertible, and if so find its inverse.

matrixmatrix operationsdeterminantinverse matrix

Approach: First compute the determinant, then find the inverse matrix.

Steps:

  1. ∣A∣=1×4−2×3=−2≠0|A| = 1 \times 4 - 2 \times 3 = -2 \neq 0, so it is invertible

  2. Compute the algebraic cofactors:

    • A11=4A_{11} = 4, A12=−3A_{12} = -3
    • A21=−2A_{21} = -2, A22=1A_{22} = 1
  3. A∗=(4−2−31)A^* = \begin{pmatrix} 4 & -2 \\ -3 & 1 \end{pmatrix}

  4. A−1=1−2(4−2−31)=(−211.5−0.5)A^{-1} = \frac{1}{-2} \begin{pmatrix} 4 & -2 \\ -3 & 1 \end{pmatrix} = \begin{pmatrix} -2 & 1 \\ 1.5 & -0.5 \end{pmatrix}

Answer: AA is invertible, and A−1=(−211.5−0.5)A^{-1} = \begin{pmatrix} -2 & 1 \\ 1.5 & -0.5 \end{pmatrix}

Exercise 6

Find the inverse of A=(123012001)A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 2 \\ 0 & 0 & 1 \end{pmatrix} by the adjugate matrix method.

matrixmatrix operationsdeterminantadjugate matrix

Approach: Use the adjugate matrix method to find the inverse matrix.

Steps:

  1. ∣A∣=1≠0|A| = 1 \neq 0, so it is invertible

  2. Compute the algebraic cofactors:

    • A11=1A_{11} = 1, A12=0A_{12} = 0, A13=0A_{13} = 0
    • A21=−2A_{21} = -2, A22=1A_{22} = 1, A23=0A_{23} = 0
    • A31=1A_{31} = 1, A32=−2A_{32} = -2, A33=1A_{33} = 1
  3. A∗=(1−2101−2001)A^* = \begin{pmatrix} 1 & -2 & 1 \\ 0 & 1 & -2 \\ 0 & 0 & 1 \end{pmatrix}

  4. A−1=(1−2101−2001)A^{-1} = \begin{pmatrix} 1 & -2 & 1 \\ 0 & 1 & -2 \\ 0 & 0 & 1 \end{pmatrix}

Answer: A−1=(1−2101−2001)A^{-1} = \begin{pmatrix} 1 & -2 & 1 \\ 0 & 1 & -2 \\ 0 & 0 & 1 \end{pmatrix}

Exercise 7

Find the inverse of A=(2111)A = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix} by the elementary row operation method.

matrixmatrix operationsdeterminantelementary row operation

Approach: Use the elementary row operation method to find the inverse matrix.

Steps:

  1. Form the augmented matrix: (21∣1011∣01)\begin{pmatrix} 2 & 1 & | & 1 & 0 \\ 1 & 1 & | & 0 & 1 \end{pmatrix}

  2. R1↔R2R_1 \leftrightarrow R_2: (11∣0121∣10)\begin{pmatrix} 1 & 1 & | & 0 & 1 \\ 2 & 1 & | & 1 & 0 \end{pmatrix}

  3. R2−2R1R_2 - 2R_1: (11∣010−1∣1−2)\begin{pmatrix} 1 & 1 & | & 0 & 1 \\ 0 & -1 & | & 1 & -2 \end{pmatrix}

  4. R2×(−1)R_2 \times (-1): (11∣0101∣−12)\begin{pmatrix} 1 & 1 & | & 0 & 1 \\ 0 & 1 & | & -1 & 2 \end{pmatrix}

  5. R1−R2R_1 - R_2: (10∣1−101∣−12)\begin{pmatrix} 1 & 0 & | & 1 & -1 \\ 0 & 1 & | & -1 & 2 \end{pmatrix}

Answer: A−1=(1−1−12)A^{-1} = \begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix}

Exercise 8

Find the adjugate matrix of the matrix A=(1234)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}.

matrixmatrix operationsdeterminantalgebraic cofactor

Approach: Compute the algebraic cofactor of each entry.

Steps:

  1. Compute the algebraic cofactors:

    • A11=4A_{11} = 4, A12=−3A_{12} = -3
    • A21=−2A_{21} = -2, A22=1A_{22} = 1
  2. Arrange them in the transposed positions: A∗=(4−2−31)A^* = \begin{pmatrix} 4 & -2 \\ -3 & 1 \end{pmatrix}

Answer: A∗=(4−2−31)A^* = \begin{pmatrix} 4 & -2 \\ -3 & 1 \end{pmatrix}

Exercise 9

Find the rank of the matrix A=(123246111)A = \begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 1 & 1 & 1 \end{pmatrix}.

matrixmatrix operationsdeterminantelementary transformation

Approach: Reduce to row echelon form by elementary transformations and count the nonzero rows.

Steps:

(123246111)\begin{pmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 1 & 1 & 1 \end{pmatrix}

R2−2R1R_2 - 2R_1: (123000111)\begin{pmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \\ 1 & 1 & 1 \end{pmatrix}

R3−R1R_3 - R_1: (1230000−1−2)\begin{pmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \\ 0 & -1 & -2 \end{pmatrix}

R2↔R3R_2 \leftrightarrow R_3: (1230−1−2000)\begin{pmatrix} 1 & 2 & 3 \\ 0 & -1 & -2 \\ 0 & 0 & 0 \end{pmatrix}

There are 2 nonzero rows, so r(A)=2r(A) = 2.

Answer: r(A)=2r(A) = 2

Exercise 10

Find the rank of the matrix A=(123424681111)A = \begin{pmatrix} 1 & 2 & 3 & 4 \\ 2 & 4 & 6 & 8 \\ 1 & 1 & 1 & 1 \end{pmatrix}.

matrixmatrix operationsdeterminantelementary transformation

Approach: Reduce to row echelon form by elementary transformations and count the nonzero rows.

Steps:

(123424681111)\begin{pmatrix} 1 & 2 & 3 & 4 \\ 2 & 4 & 6 & 8 \\ 1 & 1 & 1 & 1 \end{pmatrix}

R2−2R1R_2 - 2R_1: (123400001111)\begin{pmatrix} 1 & 2 & 3 & 4 \\ 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 \end{pmatrix}

R3−R1R_3 - R_1: (123400000−1−2−3)\begin{pmatrix} 1 & 2 & 3 & 4 \\ 0 & 0 & 0 & 0 \\ 0 & -1 & -2 & -3 \end{pmatrix}

R2↔R3R_2 \leftrightarrow R_3: (12340−1−2−30000)\begin{pmatrix} 1 & 2 & 3 & 4 \\ 0 & -1 & -2 & -3 \\ 0 & 0 & 0 & 0 \end{pmatrix}

There are 2 nonzero rows, so r(A)=2r(A) = 2.

Answer: r(A)=2r(A) = 2

Exercise 11

Decide whether the matrices A=(1234)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} and B=(2468)B = \begin{pmatrix} 2 & 4 \\ 6 & 8 \end{pmatrix} are equivalent.

matrixmatrix operationsdeterminantrank of a matrix

Approach: Compute the rank of each matrix and check whether they are equal.

Steps:

  1. A=(1234)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}, ∣A∣=−2≠0|A| = -2 \neq 0, so r(A)=2r(A) = 2

  2. B=(2468)B = \begin{pmatrix} 2 & 4 \\ 6 & 8 \end{pmatrix}, B=2AB = 2A, so r(B)=r(A)=2r(B) = r(A) = 2

  3. The two matrices have the same rank, so they are equivalent.

Answer: AA and BB are equivalent

Exercise 12

Compute the determinant of the block matrix (ABOC)\begin{pmatrix} A & B \\ O & C \end{pmatrix}, where both AA and CC are invertible matrices.

matrixmatrix operationsdeterminantblock matrix

Approach: Use the determinant property for block matrices.

Steps:

For the block matrix (ABOC)\begin{pmatrix} A & B \\ O & C \end{pmatrix}, we have A12=OA_{12} = O, so:

∣A∣=∣A11∣⋅∣A22∣=∣A∣⋅∣C∣|A| = |A_{11}| \cdot |A_{22}| = |A| \cdot |C|

Answer: ∣(ABOC)∣=∣A∣⋅∣C∣\left|\begin{pmatrix} A & B \\ O & C \end{pmatrix}\right| = |A| \cdot |C|

Exercise 13

Solve the matrix equation AX=BAX = B, where: A=(1234),B=(5678)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}, \quad B = \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}

matrixmatrix operationsdeterminant

Approach: First find A−1A^{-1}, then compute X=A−1BX = A^{-1}B.

Steps:

  1. A−1=(−211.5−0.5)A^{-1} = \begin{pmatrix} -2 & 1 \\ 1.5 & -0.5 \end{pmatrix}

  2. X=A−1B=(−211.5−0.5)(5678)X = A^{-1}B = \begin{pmatrix} -2 & 1 \\ 1.5 & -0.5 \end{pmatrix} \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix}

  3. =(−3−445)= \begin{pmatrix} -3 & -4 \\ 4 & 5 \end{pmatrix}

Answer: X=(−3−445)X = \begin{pmatrix} -3 & -4 \\ 4 & 5 \end{pmatrix}

Exercise 14

Solve the system of linear equations: {x+2y=53x+4y=7\begin{cases} x + 2y = 5 \\ 3x + 4y = 7 \end{cases}

matrixmatrix operationsdeterminantinverse matrix

Approach: Write the system in matrix form and solve it with the inverse matrix.

Steps:

  1. Write the system in matrix form: AX=bAX = b, where: A=(1234),X=(xy),b=(57)A = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}, \quad X = \begin{pmatrix} x \\ y \end{pmatrix}, \quad b = \begin{pmatrix} 5 \\ 7 \end{pmatrix}

  2. A−1=(−211.5−0.5)A^{-1} = \begin{pmatrix} -2 & 1 \\ 1.5 & -0.5 \end{pmatrix}

  3. X=A−1b=(−211.5−0.5)(57)=(−34)X = A^{-1}b = \begin{pmatrix} -2 & 1 \\ 1.5 & -0.5 \end{pmatrix} \begin{pmatrix} 5 \\ 7 \end{pmatrix} = \begin{pmatrix} -3 \\ 4 \end{pmatrix}

Answer: x=−3x = -3, y=4y = 4

Exercise 15

Prove that: if AA is an n-th order square matrix with A2=AA^2 = A, then the rank of AA equals the trace of AA.

matrixmatrix operationsdeterminantrank

Approach: Use the properties of idempotent matrices and the properties of the rank.

Steps:

  1. Because A2=AA^2 = A, the matrix AA is idempotent

  2. For an idempotent matrix, r(A)=tr(A)r(A) = \text{tr}(A)

  3. This is because the eigenvalues of an idempotent matrix can only be 0 or 1, and the number of eigenvalues equal to 1 is the rank of the matrix

  4. The trace of a matrix equals the sum of its eigenvalues, so r(A)=tr(A)r(A) = \text{tr}(A)

Answer: the proof is complete

Found an issue with this content?

Tell us what could be improved.