← Bank of America Interview Insights

Bank of America·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Apr 2026

Summary

Quant engineer interview that leaned heavily on linear algebra, specifically SVD. Short session but they pushed all the way to implementation which I wasn't fully ready for.

Questions Asked (2)

Q1

Explain singular value decomposition (SVD): what it is, how it works, and what it's used for.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Felt okay walking through the conceptual side, matrix factorization into U, sigma, V transpose, geometric intuition and all that.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start with a clear, intuitive definition of SVD, then explain the mathematical decomposition and its geometric interpretation. Finally, connect it to practical applications, especially those relevant to banking and software engineering, to show real-world impact.

Pro tip: Emphasize how SVD is used in dimensionality reduction and recommender systems, which are common in finance for customer analytics and risk modeling. Mentioning a specific example, like collaborative filtering for product recommendations, demonstrates practical insight.

1. Define SVD

State that SVD is a matrix factorization technique that decomposes any real or complex matrix into three matrices: U, Σ, and V^T. Explain that U and V are orthogonal matrices, and Σ is a diagonal matrix of singular values.

2. Explain the Mathematics

Describe the formula A = UΣV^T, where A is an m×n matrix, U is m×m, Σ is m×n (diagonal with non-negative singular values), and V^T is n×n. Highlight that singular values are the square roots of eigenvalues of A^T A or A A^T.

3. Geometric Interpretation

Explain that SVD represents a linear transformation as a rotation (V^T), scaling (Σ), and another rotation (U). This shows how any matrix can be decomposed into these fundamental operations.

4. Applications and Use Cases

List key applications: dimensionality reduction (PCA), noise reduction, recommender systems, image compression, and solving linear systems. Relate to banking: risk modeling, portfolio optimization, and customer segmentation.

5. Trade-offs and Considerations

Discuss computational complexity (O(mn^2) for full SVD), memory usage, and when to use truncated SVD for efficiency. Mention that SVD is numerically stable but can be slow for very large matrices.

Key Points to Mention

  • SVD decomposes any matrix into U, Σ, and V^T, revealing latent structure.
  • Singular values indicate the importance of corresponding singular vectors.
  • SVD is the foundation for PCA, used for dimensionality reduction.
  • Applications include recommender systems, image compression, and noise filtering.
  • In finance, SVD helps with risk management, portfolio optimization, and fraud detection.
  • Truncated SVD (keeping top k singular values) provides low-rank approximation for efficiency.

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

Q2

How would you implement an SVD algorithm from scratch?

Algorithms & Data StructuresSystem Design
Author's notes

This is where I stumbled.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: is this for a production system or educational exercise? Then outline the mathematical foundations (e.g., using eigendecomposition of A^T A or A A^T) and discuss practical implementation choices like numerical stability, memory constraints, and whether to use iterative methods (e.g., Lanczos) for large sparse matrices. Finally, walk through a concrete algorithm step-by-step, highlighting trade-offs and potential pitfalls.

Pro tip: Emphasize numerical stability and scalability: banks often deal with large, sparse datasets, so mention techniques like randomized SVD or truncated SVD to handle high-dimensional data efficiently. Also, note that in practice, you'd likely use a well-tested library (e.g., LAPACK) unless there's a specific need to implement from scratch.

1. Clarify Requirements and Constraints

Ask about matrix size, sparsity, precision requirements, and whether the implementation is for learning or production. This determines algorithm choice (e.g., direct vs. iterative).

2. Choose Mathematical Approach

Decide between computing SVD via eigendecomposition of A^T A (for small matrices) or using iterative methods like Lanczos/Arnoldi for large sparse matrices. Discuss pros and cons.

3. Outline Algorithm Steps

For the chosen method, describe steps: e.g., for eigendecomposition, compute A^T A, find its eigenvalues/eigenvectors, then derive singular values and left singular vectors. Mention handling of zero singular values.

4. Address Numerical Stability and Efficiency

Discuss techniques to improve stability (e.g., using Householder reflections, bidiagonalization) and efficiency (e.g., randomized SVD, exploiting sparsity). Mention condition number and regularization.

5. Validate and Test

Explain how to verify correctness: compare with known libraries, check orthogonality, reconstruction error, and performance on large datasets. Mention edge cases like rank-deficient matrices.

Key Points to Mention

  • Eigendecomposition of A^T A or A A^T for small matrices, and its limitations (e.g., squaring condition number).
  • Iterative methods (Lanczos, Arnoldi) for large sparse matrices, and their convergence properties.
  • Randomized SVD for approximate low-rank approximations, useful for big data.
  • Numerical stability techniques: bidiagonalization, Householder reflections, and use of double precision.
  • Memory and computational complexity: O(mn^2) for direct methods vs. O(mn log k) for randomized.
  • Practical considerations: when to use existing libraries (LAPACK, scipy) vs. custom implementation, and testing strategies.

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