ML Foundations

Learn / ML Foundations

ML Foundations: Matrices and Linear Systems

Foundational quiz on matrix shapes, multiplication, transpose, determinants, inverses, rank, and solving linear systems.

Learning path

0%

0 of 4 sections marked complete · about 28 minutes

Learning objectives

What you will be able to explain

  • What does it mean for a matrix to be m×nm \times n?
  • Match each matrix product to its result type
  • Multiply a matrix by a vector
  • Compute a matrix product
  • Matrix facts: true or false
  • When is a square matrix invertible?

Section 01

What does it mean for a matrix to be m×nm \times n? to Multiply a matrix by a vector

01

What does it mean for a matrix to be m×nm \times n?

Matrix dimensions are written as rows by columns. Shape reasoning matters constantly in ML when checking layer dimensions and linear-algebra operations.

Guided checkpoint

Choose the correct interpretation.

02

Match each matrix product to its result type

Matrix multiplication is defined when inner dimensions match. The resulting shape comes from the outer dimensions of the product.

Guided checkpoint

Let AA be 2×32 \times 3, BB be 3×23 \times 2, xx be 2×12 \times 1, and yy be 3×13 \times 1.

03

Multiply a matrix by a vector

The product is Ax=(12+21,12+31)=(4,1)Ax = (1 \cdot 2 + 2 \cdot 1, -1 \cdot 2 + 3 \cdot 1) = (4, 1). This is the basic linear-map view of a matrix.

Guided checkpoint

MatrixVector
A=[1213]A = \begin{bmatrix} 1 & 2 \\ -1 & 3 \end{bmatrix}x=[21]x = \begin{bmatrix} 2 \\ 1 \end{bmatrix}

Compute AxAx.

Section 02

Compute a matrix product to When is a square matrix invertible?

01

Compute a matrix product

Each entry comes from a row-column dot product. For example, (AB)11=12+21=4(AB)_{11} = 1 \cdot 2 + 2 \cdot 1 = 4 and (AB)22=30+4(1)=4(AB)_{22} = 3 \cdot 0 + 4 \cdot (-1) = -4.

Guided checkpoint

Let A=[1234]A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} and B=[2011]B = \begin{bmatrix} 2 & 0 \\ 1 & -1 \end{bmatrix}. Compute ABAB.

02

Matrix facts: true or false

Associativity and identity are standard matrix properties. Non-commutativity is a major reason order matters in ML pipelines and linear transformations.

Guided checkpoint

Mark each statement as true or false.

03

When is a square matrix invertible?

A square matrix is invertible exactly when its determinant is nonzero. In that case the linear map can be undone uniquely.

Guided checkpoint

Choose the key condition.

Section 03

Solve a simple linear system to What does the rank of a matrix measure?

01

Solve a simple linear system

Adding the equations gives 3x=63x = 6, so x=2x = 2. Substituting into x+y=5x + y = 5 gives y=3y = 3.

Guided checkpoint

Solve the system x+y=5x + y = 5 and 2xy=12x - y = 1.

02

Which formula is the inverse of a 2×22 \times 2 matrix?

The inverse swaps the diagonal entries, negates the off-diagonal entries, and divides by the determinant adbcad - bc.

Guided checkpoint

For A=[abcd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} with adbc0ad - bc \neq 0, choose A1A^{-1}.

03

What does the rank of a matrix measure?

Rank tells us how much independent information the matrix contains. Low-rank structure shows up all over ML, especially in compression and latent-factor models.

Guided checkpoint

Choose the best description.

Section 04

What does taking the transpose of a matrix do?

01

What does taking the transpose of a matrix do?

The transpose flips the matrix across its main diagonal, turning rows into columns and columns into rows.

Guided checkpoint

Choose the correct statement.

Knowledge check

Turn understanding into recall.

The quiz now follows the same concepts in scored form. You can return to this lesson from the quiz whenever a gap appears.