← Capital One Interview Insights

Capital One·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Capital One data scientist interview with a linear algebra question that felt more like a math exam than anything I expected. Just the one technical problem but it required a full justification, not just an answer.

Questions Asked (1)

Q1

Given a 3x3 symmetric matrix with ones on the diagonal and the same value a on every off-diagonal entry, find the smallest value of a that keeps the matrix positive semidefinite. Show your reasoning using eigenvalues or Sylvester's criterion.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

I knew the setup immediately but fumbled the justification.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, recognize that the matrix has a special structure: it can be written as (1-a)I + aJ, where J is the all-ones matrix. Then, find the eigenvalues of this matrix and determine the condition on a for all eigenvalues to be nonnegative. Alternatively, use Sylvester's criterion to derive the same condition.

Pro tip: Mention that the matrix is a common example in covariance matrices and that the condition a >= -1/2 ensures positive semidefiniteness, which is crucial for applications like correlation matrices.

1. Identify the matrix structure

Write the 3x3 matrix explicitly and observe that it can be expressed as (1-a)I + aJ, where J is the all-ones matrix.

2. Compute eigenvalues

Find the eigenvalues of the matrix. Since J has eigenvalues 3 (multiplicity 1) and 0 (multiplicity 2), the eigenvalues of the matrix are (1-a) + 3a = 1+2a and (1-a) (with multiplicity 2).

3. Apply positive semidefinite condition

For the matrix to be positive semidefinite, all eigenvalues must be nonnegative. Thus, require 1+2a >= 0 and 1-a >= 0, which gives a >= -1/2 and a <= 1.

4. Determine the smallest a

The smallest value of a that satisfies both inequalities is a = -1/2. Verify that at a = -1/2, the matrix is positive semidefinite (one eigenvalue zero, others positive).

5. Alternative: Sylvester's criterion

Optionally, use Sylvester's criterion: all principal minors must be nonnegative. Compute the 1x1 minors (1), 2x2 minors (1 - a^2), and the determinant (1 - a)^2(1+2a). This yields the same condition a >= -1/2.

Key Points to Mention

  • The matrix is symmetric and has a special structure: diagonal entries 1, off-diagonal entries a.
  • Eigenvalues are 1+2a (once) and 1-a (twice).
  • Positive semidefinite requires all eigenvalues >= 0, so a >= -1/2 and a <= 1.
  • The smallest a is -1/2, where the matrix becomes singular.
  • Sylvester's criterion: all principal minors nonnegative, leading to the same condition.
  • This matrix is a common example of a correlation matrix with equicorrelation.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.