1. Home
  2. Explore
  3. Mathematics
  4. Matrix Dimensions and Entries

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Matrix Dimensions and Entries

Speaker 1Speaker 2

Matrix Dimensions and Entries

4:35
0:00-4:35
  1. Maria

    Let’s connect matrices to something we already know: vectors. For our purposes, a matrix is a two-dimensional array of numbers. An m-by-n matrix has m rows and n columns, so it contains m times n entries.

  2. Corey

    And the subscripts tell us where an entry sits. For example, a₂₃ means the number in row two, column three. That row-and-column organization is going to determine how we multiply a matrix by a vector.

  3. Maria

    Right. Suppose A is an m-by-n matrix, and x is a vector with entries x₁ through xₙ. The product A times x is defined only when x has as many components as A has columns: n. If the sizes don’t match, this matrix-vector product isn’t defined.

  4. Corey

    So the dimensions line up like this: an m-by-n matrix times an n-by-one vector gives an m-by-one vector. The two middle dimensions match, and the result has one entry for each row of A.

  5. Maria

    Here’s the rule for finding those entries. Take the first row of A, multiply each entry by the corresponding entry of x, and add the products. That gives the first entry of the result. Then do the same with the second row, and continue row by row until you’ve used all m rows.

  6. Corey

    That’s a dot product: each row is paired with the vector, component by component. The first row produces the first output entry, the second row produces the second, and so on. That’s why an m-row matrix produces a vector with m entries.

  7. Maria

    Let’s calculate one. Take A with rows minus three, zero, three, two and one, seven, minus one, nine. Multiply it by x, whose entries are two, minus three, four, and minus one. This works because the matrix has four columns and the vector has four components.

  8. Corey

    For the first output entry, use the first row: minus three times two, plus zero times minus three, plus three times four, plus two times minus one. That’s minus six plus zero plus twelve minus two, which equals four.

  9. Maria

    For the second entry, use the second row: one times two, plus seven times minus three, plus minus one times four, plus nine times minus one. That’s two minus twenty-one minus four minus nine, which equals minus thirty-two. So the product is the two-entry vector with entries four and minus thirty-two.

  10. Corey

    There’s another useful way to describe that row-by-row calculation. If we call the rows of A r₁ through rₘ, then each output entry is the dot product of a row with x. You can also represent each row as the transpose of a column vector: transposing switches rows and columns.

  11. Maria

    For example, if a₁ is the column vector made from the entries of the first row, then a₁ transposed is that row. The first output entry can be written as a₁ transposed times x, or as the dot product of a₁ and x. The same idea applies to every row.

  12. Corey

    So that gives us one interpretation: matrix-vector multiplication gathers dot products between the vector x and the rows of the matrix. But there’s a second interpretation, this time using the columns.

  13. Maria

    Write the columns of A as v₁ through vₙ. In the multiplication A x, the first column’s entries are all multiplied by x₁, the second column’s entries are all multiplied by x₂, and the pattern continues through the last column and xₙ.

  14. Corey

    Then add those scaled columns together. In symbols, A x equals x₁v₁ plus x₂v₂, continuing through xₙvₙ. In other words, the product is a linear combination of the columns of A, and the entries of x tell us the weights.

  15. Maria

    Those are two views of the same calculation: row dot products tell you how to compute each output entry, while a weighted combination of columns tells you how to build the output vector. Both perspectives help make the definition more than just a set of arithmetic steps.

  16. Corey

    And they’re useful in different ways as we study matrices further. For now, remember the key checks and interpretations: the vector must have as many components as the matrix has columns, the result has one entry per row, and that result can be understood either through row dot products or as a linear combination of the matrix’s columns.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent