Linear Algebra and Numerical Computing Questions

The linear algebra and numerical methods that machine-learning and scientific code rest on. Covers vectors, matrices and their operations, eigenvalues and eigenvectors and their geometry, singular value decomposition and PCA as linear algebra (variance explained, randomized SVD), least squares, the normal equations and rank deficiency, matrix calculus and gradients of quadratic objectives, conditioning and its effect on solvers, feature scaling and gradient descent, ill-conditioned covariance matrices and the fixes for them (shrinkage, truncated pseudo-inverse, dimension reduction), floating-point error and numerically stable algorithms (compensated and pairwise summation), iterative methods such as power iteration, and the mathematics of optimization: convexity, smoothness, strong convexity, convergence rates of gradient descent, preconditioning, saddle points and Hessian tests for stationary points, Lagrange multipliers and KKT conditions. Questions are about deriving, computing and reasoning about precision and convergence. Probability and statistical inference, learning-theory bounds, neural-network training practice, and library API mechanics are covered elsewhere.

MediumTechnical
102 practiced

Explain ridge regression through the singular value decomposition of the design matrix. What does the penalty do to each singular direction, why does that fix unstable coefficients under multicollinearity, and how does it compare with simply dropping the small singular values?

EasyTechnical
56 practiced

Minimize x^2 + y^2 subject to x + y = 1 using Lagrange multipliers. Show the steps and explain the geometric meaning of the solution.

MediumTechnical
68 practiced

Derive the gradient with respect to a matrix X of trace(A X B) and of log det X, and check the shapes. Where do these identities show up in machine learning, for example in the maximum-likelihood estimate of a Gaussian's covariance?

EasyTechnical
70 practiced

Derive the gradient of f(x) = ||Ax - b||^2 with respect to x. What does setting it to zero give you, and when is the solution well defined?

MediumTechnical
58 practiced

State the KKT conditions for a problem with inequality constraints and explain each one using a small worked example.

Unlock Full Question Bank

Get access to all 15 Linear Algebra and Numerical Computing interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.