Matrices & linear systems

matrix

A matrix is just a rectangular grid of numbers arranged in rows and columns. We say a matrix is m-by-n when it has m rows and n columns, so [[1,2,3],[4,5,6]] is a 2-by-3 matrix.

There are three ways to read it. As a table of data (think a spreadsheet of prices or pixel brightness). As a list of column vectors stacked side by side. And, most powerfully, as a function that takes a vector in and gives a new vector out, stretching, rotating, or shearing space.

That last view is why matrices run through all of linear algebra: rotating an image, solving equations, or predicting tomorrow's weather can all be packaged as one matrix acting on a vector.

A = [[1, 2, 3], [4, 5, 6]] (2 rows, 3 columns)

A 2-by-3 matrix: two rows, three columns.

Rows always come first: an m-by-n matrix has m rows and n columns, in that order.

Also called
matricesm-by-n array矩阵矩陣m x n 数表