Mathematical Foundations MCQs for NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

Mathematical Foundations is the second topic in the NSCT's AI, Machine Learning & Data Analytics area. It covers the four bits of maths every ML model rests on: linear algebra (vectors and matrices), probability, statistics and gradients. The whole area carries 10% of the test, according to HEC's Areas of Competencies.

Most questions here are short calculations, so they reward practice more than memory. The HEC NSCT report puts 2026 accuracy at 45.1% for application questions and 44.8% for analysis, lower than the 49.5% for understanding. Calculation questions like the ones on this page usually fall into those two harder tiers.

Linear algebra

A vector is an ordered list of numbers, such as one row of features. A matrix is a table of numbers, such as a whole dataset with one row per sample. The core operations:

Exam angle: shape questions are free marks. If X is (100 x 3) and w is (3 x 1), then Xw is (100 x 1) but wX is undefined.

Probability

Probability measures how likely an event is, from 0 to 1. The rules you need:

Rule Formula Use
Addition P(A or B) = P(A) + P(B) - P(A and B) Either event
Independence P(A and B) = P(A) P(B) Unrelated events
Conditional P(A given B) = P(A and B) / P(B) Updating on information
Bayes' theorem P(A given B) = P(B given A) P(A) / P(B) Reversing a conditional

Common distributions are Bernoulli (one yes/no trial), binomial (number of successes in n trials), uniform and normal. Naive Bayes classifiers apply Bayes' theorem directly.

Exam angle: mutually exclusive is not the same as independent. If two events with non-zero probability cannot happen together, knowing one happened tells you the other did not, so they are dependent.

Statistics

Statistics summarises data. Mean is the average, median the middle value after sorting and mode the most frequent value. The median resists outliers; the mean does not. Variance is the average squared distance from the mean, and standard deviation is its square root.

Watch the denominator. For 1, 3 and 5, the mean is 3 and the squared deviations add to 8. Population variance divides by n (8 / 3 = 2.67), while sample variance divides by n - 1 (8 / 2 = 4). Textbooks and libraries differ here: NumPy's np.var uses n by default, while pandas' .var() uses n - 1.

Other ideas that appear: the z-score (x - mean) / sd, the 68-95-99.7 rule for normal data, and Pearson correlation r, which measures only linear association, from -1 to +1.

Exam angle: in a right-skewed distribution, such as incomes, the mean is above the median.

Gradients

A derivative gives the rate of change of a function; a gradient is the vector of partial derivatives for a function of several variables. The gradient points in the direction of steepest increase, so gradient descent updates weights with w = w - learning rate x gradient.

Example: for f(w) = w^2 at w = 2 with learning rate 0.25, the gradient is 2w = 4, so the new w = 2 - 0.25 x 4 = 1. A learning rate that is too large overshoots and can diverge. Backpropagation uses the chain rule to pass gradients back through layers.

Exam angle: know the sigmoid derivative, s(z)(1 - s(z)), which peaks at 0.25 at z = 0. Multiplying many such small values causes vanishing gradients.

Common traps

Worked examples

1. Understanding. What can you say about a square matrix whose determinant is 0? Answer: it is singular. It has no inverse, its columns are linearly dependent and at least one eigenvalue is 0.

2. Application. Compute [[2, 1], [0, 3]] multiplied by the vector [1, 2]. Answer: [4, 6]. Row 1 gives 2x1 + 1x2 = 4, and row 2 gives 0x1 + 3x2 = 6.

3. Analysis. 20% of emails are spam. The word "prize" appears in 50% of spam and 5% of genuine emails. An email contains "prize". What is the probability it is spam? Answer: about 71%. By Bayes' theorem, P(spam given prize) = 0.2 x 0.5 / (0.2 x 0.5 + 0.8 x 0.05) = 0.10 / 0.14 = 0.714. The tempting answer, 50%, is P(prize given spam), the reverse conditional.

Practise

The quiz below has 99 questions on this topic, which you can filter by tier and difficulty.

Practise: 99 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. What does the dot product of two vectors of the same length return?

    1. A single number (scalar)
    2. A vector of the same length
    3. A matrix
    4. A vector of double the length
    Show answer

    Answer: A. A single number (scalar)

    The dot product multiplies matching components and adds them: a . b = sum of a_i x b_i. The result is one scalar. In ML, a neuron's weighted sum w . x is a dot product.

  2. If matrix A has shape 3 x 4 and matrix B has shape 4 x 2, what is the shape of the product AB?

    1. 4 x 4
    2. 3 x 4
    3. 3 x 2
    4. 2 x 3
    Show answer

    Answer: C. 3 x 2

    For AB to exist, A's column count must equal B's row count (4 = 4). The result takes A's rows and B's columns: 3 x 2.

  3. Which statement about matrix multiplication is true in general?

    1. It is commutative, so AB always equals BA
    2. It is neither associative nor commutative
    3. It is only defined for square matrices
    4. It is associative, (AB)C = A(BC), but not commutative, AB is usually not equal to BA
    Show answer

    Answer: D. It is associative, (AB)C = A(BC), but not commutative, AB is usually not equal to BA

    Matrix multiplication is associative and distributive, but order matters: AB and BA can differ or one may not even exist. Non-square matrices can be multiplied whenever the inner dimensions match.

  4. A non-zero vector v is an eigenvector of square matrix A when:

    1. Av = lambda v for some scalar lambda, so A only stretches or flips v
    2. Av = 0 for every v
    3. A multiplied by v gives the identity matrix
    4. v is perpendicular to every row of A
    Show answer

    Answer: A. Av = lambda v for some scalar lambda, so A only stretches or flips v

    An eigenvector keeps its direction under the transformation A; it is only scaled by its eigenvalue lambda. PCA uses the eigenvectors of the covariance matrix as the principal directions.

  5. The rank of a matrix is:

    1. The number of non-zero entries
    2. The largest entry in the matrix
    3. The number of linearly independent rows (equivalently, columns)
    4. The number of rows multiplied by the number of columns
    Show answer

    Answer: C. The number of linearly independent rows (equivalently, columns)

    Rank counts independent rows or columns; row rank always equals column rank. For example, [[1,2,3],[2,4,6],[1,0,1]] has rank 2 because the second row is twice the first.

  6. Which statement about a square matrix with determinant 0 is correct?

    1. It is the identity matrix
    2. It always has all eigenvalues equal to 1
    3. It is singular: it has no inverse and its columns are linearly dependent
    4. Its inverse is its transpose
    Show answer

    Answer: C. It is singular: it has no inverse and its columns are linearly dependent

    A zero determinant means the matrix squashes space into a lower dimension, so it cannot be undone: no inverse exists, at least one column is a combination of others and 0 is one of its eigenvalues.

  7. What does the variance of a dataset measure?

    1. How spread out the values are around the mean
    2. The most frequent value
    3. The middle value after sorting
    4. The difference between the largest and the smallest value
    Show answer

    Answer: A. How spread out the values are around the mean

    Variance is the average squared deviation from the mean. Its square root is the standard deviation. The most frequent value is the mode, the middle value is the median and max minus min is the range.

  8. Which measure of central tendency is most robust to extreme outliers?

    1. Mean
    2. Range
    3. Median
    4. Variance
    Show answer

    Answer: C. Median

    The median depends only on the middle position after sorting, so a single huge value barely moves it. The mean uses every value and is pulled towards outliers. Range and variance measure spread, not centre.

  9. Which formula is Bayes' theorem?

    1. P(A|B) = P(A) P(B)
    2. P(A|B) = P(A) + P(B) - P(A and B)
    3. P(A|B) = P(B|A) / P(A)
    4. P(A|B) = P(B|A) P(A) / P(B)
    Show answer

    Answer: D. P(A|B) = P(B|A) P(A) / P(B)

    Bayes' theorem reverses a conditional probability: posterior = likelihood x prior / evidence. P(A)P(B) is the joint probability only for independent events, and the addition formula gives P(A or B).

  10. Events A and B are independent when:

    1. P(A and B) = 0
    2. P(A) + P(B) = 1
    3. P(A|B) = P(B|A) for any A and B
    4. P(A and B) = P(A) x P(B)
    Show answer

    Answer: D. P(A and B) = P(A) x P(B)

    Independence means knowing B does not change the probability of A, so P(A|B) = P(A), which is equivalent to P(A and B) = P(A)P(B). P(A and B) = 0 describes mutually exclusive events.

FAQs

How much maths do I need for the NSCT AI and ML area?

You need working knowledge, not proofs. Be able to multiply small matrices, find a 2 x 2 determinant and inverse, use Bayes' theorem, compute mean, median, variance and standard deviation, and take simple derivatives for a gradient descent step. These skills also come up in later topics such as PCA, Naive Bayes and neural networks.

Why does PCA use eigenvectors?

PCA looks for directions in which the data varies most. The covariance matrix describes how features vary together, and its eigenvectors are exactly those directions. Each eigenvalue gives the variance along its eigenvector, so sorting eigenvalues from largest to smallest ranks the principal components. The share of variance a component explains is its eigenvalue divided by the sum of all eigenvalues.

What happens if the learning rate is too high or too low?

Too high, and each step overshoots the minimum, so the loss bounces around or grows without limit. Too low, and training moves in tiny steps and can take very long to converge. For f(w) = w^2, any learning rate above 1 makes the weights diverge, while very small rates converge slowly.

Next step

Continue with Python for AI & Data Analytics MCQs, the next official topic, or go back to the AI and ML MCQs hub. If you skipped the basics, start with Introduction to AI, ML & Data Analytics. Then check yourself in an NSCT mock test.