MCQs on Matrix Manipulations | MATLAB

1. Advanced Matrix Operations (Transposition, Inversion)

  1. What symbol is commonly used to denote the transpose of a matrix in MATLAB?
    • A. *
    • B. '
    • C. @
    • D. ^
  2. Which function computes the inverse of a square matrix in MATLAB?
    • A. inv
    • B. transpose
    • C. eig
    • D. det
  3. A matrix is invertible if and only if its determinant is:
    • A. Equal to zero
    • B. Greater than zero
    • C. Less than zero
    • D. Non-zero
  4. The product of a matrix and its inverse is always:
    • A. A diagonal matrix
    • B. The identity matrix
    • C. A null matrix
    • D. Undefined
  5. The transpose of a row vector is:
    • A. Another row vector
    • B. A column vector
    • C. A scalar
    • D. The original row vector
  6. Which MATLAB function directly computes the Hermitian transpose of a matrix?
    • A. ctranspose
    • B. transpose
    • C. hermit
    • D. conjugate

2. Linear Algebra (eig, inv, rank)

  1. What does the eig function compute in MATLAB?
    • A. Eigenvalues and eigenvectors
    • B. Determinant
    • C. Rank of the matrix
    • D. Singular values
  2. If a matrix has full rank, it implies:
    • A. The matrix is singular
    • B. The matrix is invertible
    • C. The determinant is zero
    • D. The matrix is not square
  3. The rank of a matrix is defined as:
    • A. The number of rows
    • B. The number of non-zero rows in its reduced form
    • C. The determinant of the matrix
    • D. The number of columns
  4. Which MATLAB function calculates the determinant of a matrix?
    • A. eig
    • B. det
    • C. rank
    • D. inv
  5. What condition must be satisfied for eigenvalues to exist?
    • A. The matrix must be diagonal
    • B. The matrix must be square
    • C. The determinant must be zero
    • D. The rank must be full
  6. Which command finds the pseudo-inverse of a matrix?
    • A. inv
    • B. pinv
    • C. eig
    • D. rank

3. Sparse Matrices

  1. Sparse matrices are advantageous because they:
    • A. Store all elements explicitly
    • B. Minimize memory usage by storing only non-zero elements
    • C. Increase computational time
    • D. Cannot be used for linear algebra operations
  2. The function sparse in MATLAB:
    • A. Converts a matrix to full storage
    • B. Converts a matrix to sparse storage
    • C. Computes eigenvalues for sparse matrices
    • D. Finds the determinant of sparse matrices
  3. Which of the following is a valid MATLAB function for sparse matrices?
    • A. nnz
    • B. spconvert
    • C. spy
    • D. All of the above
  4. The nnz function returns:
    • A. The total number of elements in a matrix
    • B. The number of non-zero elements in a matrix
    • C. The determinant of the matrix
    • D. The eigenvalues of the matrix
  5. To visualize the pattern of non-zero elements in a sparse matrix, you use:
    • A. spy
    • B. nnz
    • C. imshow
    • D. plot
  6. Which function converts a sparse matrix to its full representation?
    • A. sparse
    • B. full
    • C. reshape
    • D. inv

4. Reshaping and Sorting

  1. What does the reshape function do in MATLAB?
    • A. Changes the data type of elements
    • B. Changes the size of a matrix without changing data order
    • C. Sorts the elements of a matrix
    • D. Computes eigenvalues
  2. Which MATLAB function sorts the elements of a matrix?
    • A. sort
    • B. rank
    • C. reshape
    • D. eig
  3. The sortrows function:
    • A. Sorts the matrix column-wise
    • B. Sorts the matrix row-wise
    • C. Sorts rows based on column values
    • D. Reshapes the matrix
  4. To flatten a matrix into a single column, you use:
    • A. reshape(A, [], 1)
    • B. flatten(A)
    • C. sort(A)
    • D. compress(A)
  5. Reshaping a matrix requires:
    • A. The product of the dimensions to remain constant
    • B. The matrix to be square
    • C. The determinant to be non-zero
    • D. The matrix to have integer elements
  6. Sorting elements in descending order requires which syntax?
    • A. sort(A, 'ascend')
    • B. sort(A, 'descend')
    • C. sort(A, -1)
    • D. sort(A, 'rev')
  7. Which MATLAB function rearranges a matrix based on a specified condition?
    • A. filter
    • B. sortrows
    • C. sort
    • D. reshape
  8. The permute function is used for:
    • A. Rotating a matrix
    • B. Rearranging the dimensions of a matrix
    • C. Flattening a matrix
    • D. Sorting a matrix
  9. To obtain unique elements of a matrix in sorted order, you use:
    • A. sort
    • B. unique
    • C. reshape
    • D. permute
  10. Which function repeats a matrix along specified dimensions?
    • A. repmat
    • B. repeat
    • C. duplicate
    • D. expand
  11. A vectorized operation on a matrix:
    • A. Reduces computational efficiency
    • B. Applies operations element-wise without loops
    • C. Only works with square matrices
    • D. Requires explicit storage of zeros
  12. The flip function in MATLAB is used to:
    • A. Sort a matrix
    • B. Invert a matrix
    • C. Reverse the order of elements along a dimension
    • D. Compute the determinant

Answers Table

QnoAnswer (Option with Text)
1B. '
2A. inv
3D. Non-zero
4B. The identity matrix
5B. A column vector
6A. ctranspose
7A. Eigenvalues and eigenvectors
8B. The matrix is invertible
9B. The number of non-zero rows in its reduced form
10B. det
11B. The matrix must be square
12B. pinv
13B. Minimize memory usage by storing only non-zero elements
14B. Converts a matrix to sparse storage
15D. All of the above
16B. The number of non-zero elements in a matrix
17A. spy
18B. full
19B. Changes the size of a matrix without changing data order
20A. sort
21C. Sorts rows based on column values
22A. reshape(A, [], 1)
23A. The product of the dimensions to remain constant
24B. sort(A, 'descend')
25B. sortrows
26B. Rearranging the dimensions of a matrix
27B. unique
28A. repmat
29B. Applies operations element-wise without loops
30C. Reverse the order of elements along a dimension

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top