What Is a Matrix?
A matrix is a rectangular arrangement of values in rows and columns.
CodeBhavya
Learn how rectangular arrays represent data, perform matrix operations step by step, and connect matrices with images, graphs, transformations and machine learning.
After completing this topic, you should be able to:
A matrix is a rectangular arrangement of values in rows and columns.
The example has 2 rows and 3 columns, so its order is 2 ร 3.
Aij means the element in row i, column j. Here A23 = 7.
matrix[row][column].A row matrix has one row; a column matrix has one column.
A square matrix has equal rows and columns; otherwise it is rectangular.
Every element is 0. It acts like zero in matrix addition.
Diagonal entries are 1 and all others are 0. AI = IA = A.
All non-diagonal entries are 0.
A square matrix is symmetric when AT = A.
Multiply every element by the scalar value.
Multiply each row of the first matrix by each column of the second matrix.
The transpose exchanges rows and columns. If A is m ร n, then AT is n ร m.
det(A) = ad โ bc
det(A) = 4ร5 โ 3ร2 = 14.
An inverse exists only when ad โ bc โ 0.
Enter two 2 ร 2 matrices, choose an operation and click Calculate Matrix. Results remain hidden until the button is clicked.
A grayscale image is a matrix of pixel intensities. Colour images use matrices for red, green and blue channels.
An adjacency matrix records whether vertices are connected. Undirected graphs produce symmetric adjacency matrices.
Rotation, scaling and reflection in computer graphics are expressed using matrix multiplication.
Datasets, weights and feature transformations are stored and processed as matrices.
Problem: A has 3 rows and 4 columns. State its order and number of elements.
Problem: Add A=[[2,1],[4,3]] and B=[[5,2],[1,6]].
Problem: Multiply [[1,2],[0,3]] by [[4,1],[2,5]].
Problem: Find det([[6,2],[3,4]]).
1. Find the order and number of elements in a matrix with 5 rows and 2 columns.
2. Add [[3,โ1],[2,5]] and [[4,6],[โ2,1]].
3. Can a 2 ร 3 matrix multiply a 2 ร 2 matrix in that order?
4. Find the transpose of [[1,4,7],[2,5,8]].
5. Find the determinant of [[7,3],[2,5]] and state whether it has an inverse.
Complete 20 questions from easy to hard. Your score, every option, correct answers and explanations appear after final submission.