1. Matrix: creation and element-access
A matrix is a two-dimensional array.
Let us denote matrices via bold uppercase letters as follows:
For instance, the matrix below is denoted with A, a capital bold A.
A=⎝⎛a11a21a31a12a22a32a13a23a33⎠⎞
We usually put commas between the row and column indexing sub-scripts, to make the possibly multi-digit indices distinguishable as follows:
A=⎝⎛a1,1a2,1a3,1a1,2a2,2a3,2a1,3a2,3a3,3⎠⎞
- Ai,j denotes the entry in i-th row and j-th column of the matrix A.
- So for instance,
- the first entry, the top left entry, is denoted by A1,1.
- And the entry in the third row and second column is denoted by A3,2.
- We say that a matrix with n rows and m columns is an n by m matrix and written as n×m
- The matrix A shown above is a generic 3×3 (pronounced 3-by-3) matrix.
- And the matrix in Ameet's example in the video above, having 4 rows and 3 columns, is a 4 by 3 matrix.
- If a matrix A is n×m, we write:
- A∈Rn×m and say that A is an R to the power of the n times m,
- where, R here denotes the set of all real numbers in the line given by the open interval: (−∞,+∞).
SDS-2.x, Scalable Data Engineering Science
Last refresh: Never