3. Important definitions
Matrix • Two-dimensional rectangular array of real or complex
numbers
• Containing a certain number “m” of rows and a certain
number of “n” columns.
• When “m” = “n”, the matrix is called a square matrix.
m
n
m n≠m = n
Scalar 1-by-1 array
Vector
Column vector
m-by-1 array
One dimensional arrays
1-by-n array
Row Vector
4. Creating Vectors
Row Vector Column Vector
Colon operator (:)
linspace function
Transpose
Semicolon
Space
Comma
Enter
5. 5
Creating Matrices
must:
• begin with a square bracket [
• separate elements in a row with commas or spaces
• use a semicolon; to separate rows
• end the matrix with another square bracket ].