Challenge - 5 Problems
Matrix Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of matrix rank calculation
What is the output of the following MATLAB code?
MATLAB
A = [1 2 3; 4 5 6; 7 8 9]; r = rank(A); disp(r);
Attempts:
2 left
💡 Hint
Think about the linear dependence of rows in matrix A.
✗ Incorrect
The matrix A has linearly dependent rows, so its rank is 2, not 3.
❓ Predict Output
intermediate2:00remaining
Null space dimension of a matrix
What is the size of the null space of matrix B?
MATLAB
B = [1 0 0; 0 1 0; 0 0 0]; N = null(B); disp(size(N, 2));
Attempts:
2 left
💡 Hint
The null space dimension equals the number of free variables.
✗ Incorrect
Matrix B has rank 2, so nullity = 3 - 2 = 1.
🔧 Debug
advanced2:00remaining
Identify the error in null space calculation
What error will this MATLAB code produce?
MATLAB
C = [1 2; 3 4]; N = null(C, 'r'); disp(N);
Attempts:
2 left
💡 Hint
Check the documentation for the null function's accepted arguments.
✗ Incorrect
The null function in MATLAB does not accept a second argument 'r'.
🧠 Conceptual
advanced2:00remaining
Rank-nullity theorem application
Given a 4x5 matrix D with rank 3, what is the dimension of its null space?
Attempts:
2 left
💡 Hint
Use the formula: nullity = number_of_columns - rank.
✗ Incorrect
Nullity = 5 - 3 = 2, so the null space dimension is 2.
❓ Predict Output
expert3:00remaining
Output of null space basis vectors
What is the output of this MATLAB code?
MATLAB
E = [1 2 3; 2 4 6; 3 6 9]; N = null(E); disp(N);
Attempts:
2 left
💡 Hint
The null space basis vector is orthogonal to the rows of E.
✗ Incorrect
The null function returns a basis vector approximately [-0.8018; 0.2673; 0.5345].