01 Key Concepts
MATLAB's Core Idea
Everything in MATLAB is treated as a matrix (even a single number is a 1x1 matrix), making it especially natural for linear algebra and numerical work.
Creating Matrices
Matrices are created with square brackets, semicolons separating rows: A = [1 2; 3 4] creates a 2x2 matrix.
Basic Matrix Operations
A + B and A * B work directly on matrices; A' computes the transpose; inv(A) computes the inverse.
Vectors and Ranges
A range like 1:5 creates the vector [1 2 3 4 5]; 1:2:10 creates [1 3 5 7 9], stepping by 2.
Built-in Functions
MATLAB includes many built-in mathematical functions like sqrt(), sin(), det(), and eig() (for eigenvalues), applied directly to matrices.
02 Key Formulas
- A = [1 2; 3 4] creates a 2x2 matrix
- A' computes the transpose of A
- inv(A) computes the inverse of A
03 Solved Examples
- This creates a range (row vector) from 1 to 5, incrementing by 1 by default.
- The apostrophe computes the transpose, swapping rows and columns.
- Row 1 (1,2) becomes column 1; row 2 (3,4) becomes column 2.
- Apply the 2x2 determinant formula: (2*3)-(0*0).
04 Practice Questions
๐ MATLAB Basics โ Downloadable Worksheet
10 questions with a full answer key. Grab the PDF to print, or try the interactive version in your browser.