Imagine yourself in an electronics store, buying a new camera. The store assistant says, "This is a great camera, it has a 16-megapixel matrix", and you are frantically trying to remember what the word "matrix" means. Let's figure it out.
The matrix of a 16 MP digital camera is a rectangular array of 4928 by 3264 photosensors, each representing a pixel. If you multiply these numbers, you will get 16,084,992 (about 16 million) pixels.
In fact, if you really are into buying a camera, you should know that the number of pixels is not the only thing that matters; their physical size is also important. A matrix with bigger pixels produces a better quality image.
Okay, so you have bought that camera, and the information about your purchase has appeared in the accounting table of the store like this:
July | August | September | |
Canon | 8 | 21 | 9 |
Nikon | 5 | 2 | 11 |
Sony | 12 | 4 | 11 |
Olympus | 2 | 15 | 4 |
This table, as well as the matrix with pixels, can be represented as a matrix (plural: matrices):
In general, a matrix is a rectangular array of elements arranged in rows and columns. The elements can be numbers, symbols, or expressions. Below we will talk about numerical elements.
Matrix Dimension
The number of rows and columns defines the dimension of a matrix.
For example, matrix has 4 rows and 3 columns, so the dimension of matrix A is 4 x 3 (read "four by three").
More generally, an m × n matrix has m rows and n columns:
Vectors
If a matrix has only one row or one column , such matrices are called vectors (row vector or column vector). Example: the coordinates of a point K in the three-dimensional space is a matrix "one by three".
Matrix Elements
Each element has its own position in the matrix. In matrix A, an element in row m and column n is represented by . In our electronics shop example, element tells us that the Canon cameras were purchased 21 times in August (check the table above).
The order of elements in the matrix is important. Imagine what would happen with our world if point and point occupied the same place?
In computer graphics, matrices are used in such operations as translations, rotations, scaling, and more. These concepts are relevant to video game graphics. Understanding matrices is a basic necessity for programming 3D video games. Also the matrix which we mention above is real: computers can process photos precisely because the images are presented as matrices.