Linear Algebra for AI

Chapter 15
Responsible Practice and Emerging Directions

Bachelors Program in AI & ML
Linear Algebra for AI   •   Bachelor

Responsible Practice and Emerging Directions

Introduction

Linear algebra is often presented as a neutral mathematical language for artificial intelligence. Vectors, matrices, projections, decompositions, and tensor operations are indeed mathematical objects; however, the data used to construct them and the decisions made from them are not neutral. An embedding can preserve social stereotypes, a projection can conceal a minority group, a low-rank approximation can remove information needed for safety, and a numerically unstable computation can make an AI system difficult to audit.

Responsible practice in linear algebra therefore requires more than obtaining a low loss or an efficient matrix multiplication. It requires understanding what information a representation contains, whose information may be exposed, how errors are distributed, whether results are reproducible, and what controls govern deployment. At the same time, advances in computing are changing how linear algebra is implemented. Mixed-precision arithmetic, tensor decomposition, federated learning, neuromorphic hardware, and quantum algorithms offer possible gains in speed, memory, privacy, or energy efficiency, but each introduces new assumptions and risks.

This chapter connects foundational linear algebra to responsible AI practice and emerging computational directions. The focus is not only on what can be computed, but also on whether it should be computed, how it can be evaluated, and how its consequences can be governed.

Learning Objectives

By the end of this chapter, a student should be able to:

1. Explain how bias can arise in embeddings and dimensionality-reduction methods.

2. Evaluate privacy leakage and adversarial sensitivity in vector and matrix representations.

3. Describe numerical auditability and governance controls for AI systems using linear algebra.

4. Explain the benefits and risks of mixed precision and tensor decomposition.

5. Compare federated, neuromorphic, and quantum approaches to linear algebra.

6. Select appropriate evaluation and documentation practices for responsible deployment.

7. Critically assess future requirements for trustworthy AI systems.

1. Representations Are Technical and Social Objects

An embedding maps an object—such as a word, user, image, document, or product—to a vector in a numerical space. If an embedding function is written as

\[

f: \mathcal{X} \rightarrow \mathbb{R}^d,

\]

then each input in set \(\mathcal{X}\) is represented by a vector of dimension \(d\). Similarity is commonly measured using the dot product or cosine similarity. For nonzero vectors \(x\) and \(y\), cosine similarity is

\[

\operatorname{cos}(x,y)=\frac{x^\top y}{\|x\|_2\|y\|_2}.

\]

This measure is defined when both vectors are nonzero. It is scale-invariant, but it does not make a representation unbiased. Similarity reflects patterns in the training data, the learning objective, the sampling process, and the choices made by the practitioner.

Bias may enter through:

  • Historical bias: the data reflect unequal treatment or stereotypes.
  • Representation bias: some populations, languages, or contexts are underrepresented.
  • Measurement bias: variables are measured differently across groups.
  • Aggregation bias: one model is assumed to work equally well for groups with different distributions.
  • Evaluation bias: benchmarks omit relevant populations or tasks.
  • Deployment bias: a representation is used in a context different from the one for which it was developed.

A mathematically elegant representation can therefore support unfair outcomes. The central principle is that linear algebra provides a representation and transformation system; it does not supply the social meaning or ethical justification of those transformations.

2. Bias in Embeddings

2.1 Geometric manifestations of bias

Embedding bias can appear as differences in vector norms, neighborhood structure, cluster density, or directions associated with social attributes. Suppose a protected attribute is represented by a direction

\[

g = \frac{v_a-v_b}{\|v_a-v_b\|_2},

\]

where \(v_a\) and \(v_b\) are vectors associated with two contrasting concepts. The scalar projection of an item vector \(x\) on this direction is

\[

\operatorname{proj}_g(x)=x^\top g.

\]

Large or systematically different projections across groups may indicate association with the attribute. They do not by themselves prove discrimination: the direction may encode legitimate task information, confounding variables, or artifacts of the chosen concepts. Responsible analysis therefore combines geometric diagnostics with domain knowledge and outcome-based evaluation.

2.2 Measuring group differences

For a binary group comparison, a practitioner might compare the distribution of a score \(s(x)\) across groups. Useful summaries include group means, variances, rank distributions, nearest-neighbor composition, and downstream error rates. A difference in means can be written as

\[

\Delta=\mathbb{E}[s(X)\mid A=0]-\mathbb{E}[s(X)\mid A=1].

\]

The quantity \(\Delta\) is descriptive, not a universal fairness criterion. Its interpretation depends on the task, the data-generating process, and whether the score has a legitimate relationship to the outcome. Small average differences may coexist with large harms for a subgroup, while large differences may be justified in some scientific or operational applications.

Evaluation should include subgroup performance, intersectional groups, calibration where relevant, false-positive and false-negative rates, and qualitative inspection by affected experts. Removing an explicit demographic coordinate does not necessarily remove bias, because other coordinates may act as proxies.

2.3 Mitigation strategies and trade-offs

Common approaches include:

  • Data improvement: broaden representation, correct labels, and document collection conditions.
  • Objective modification: penalize unwanted associations during training.
  • Post-processing: transform or calibrate outputs for a specified use case.
  • Subspace projection: remove a selected direction or subspace associated with an attribute.
  • Task-specific evaluation: test the representation on realistic downstream applications.

A projection that removes a subspace can be expressed as

\[

P=I-UU^\top,

\]

where the columns of \(U\) are orthonormal basis vectors for the subspace being removed. The transformed representation is \(Px\). This is a valid orthogonal projection when \(U^\top U=I\). It may reduce a measured association, but it can also remove useful information, fail to remove nonlinear or distributed information, and create unequal effects across groups. Mitigation is therefore not equivalent to proving fairness.

3. Bias in Dimensionality Reduction

Dimensionality reduction replaces a high-dimensional vector with a lower-dimensional representation. Principal component analysis (PCA), for example, centers data and finds directions of greatest variance. If centered observations form matrix \(X\), the sample covariance matrix is

\[

S=\frac{1}{n-1}X^\top X,

\]

where \(n\) is the number of observations. PCA selects eigenvectors of \(S\) associated with the largest eigenvalues. If \(V_k\) contains the first \(k\) eigenvectors, the reduced coordinates are

\[

Z=XV_k.

\]

PCA optimizes reconstruction error among rank-

\(k\) linear approximations under standard Euclidean loss. It does not optimize fairness, privacy, interpretability, or equal utility across groups.

A minority group may have low variance and therefore be represented poorly by PCA, even if its features are important for safety or equity. Conversely, a protected attribute may dominate high-variance directions, making it easy to infer from the reduced representation. The choice of distance metric also matters: Euclidean geometry may be inappropriate when variables have different scales or when meaningful relationships are nonlinear.

Responsible dimensionality reduction should therefore ask:

1. What information is being preserved by the objective?

2. Which populations contribute most to the covariance structure?

3. What information is discarded?

4. Can sensitive attributes be reconstructed from the reduced coordinates?

5. How do downstream errors change by subgroup?

6. Is the reduction reversible or approximately reversible?

Random projections can preserve pairwise distances approximately under suitable assumptions, but distance preservation is not equivalent to fairness or privacy. A representation that preserves all distances may also preserve sensitive structure.

4. Privacy Leakage in Vector and Matrix Representations

Privacy leakage occurs when a representation reveals information beyond what users reasonably expect or what the system is authorized to use. Leakage can arise even when raw records are deleted.

4.1 Sources of leakage

Important sources include:

  • Membership inference: determining whether a record appeared in training data.
  • Attribute inference: predicting a sensitive attribute from an embedding.
  • Model inversion: reconstructing features or approximate inputs.
  • Nearest-neighbor exposure: returning memorized or identifying examples.
  • Gradient or update leakage: recovering information from distributed training updates.
  • Linkage attacks: combining embeddings with external datasets.

An embedding is not automatically anonymous. High-dimensional vectors may contain enough information to identify a person, especially when combined with auxiliary data.

4.2 Privacy–utility trade-offs

Noise can reduce leakage but also degrade utility. In a simplified additive mechanism, a representation \(z\) is released as

\[

\tilde z=z+\eta,

\]

where \(\eta\) is random noise. The appropriate noise distribution and scale depend on the privacy definition, sensitivity of the query, threat model, and desired privacy budget. Noise added without a formal privacy analysis should not be described as providing a guaranteed level of privacy.

Differential privacy provides a formal framework. A randomized mechanism \(M\) is \((\varepsilon,\delta)\)-differentially private if, for neighboring datasets \(D\) and \(D'\) and every measurable output set \(S\),

\[

\Pr[M(D)\in S]\leq e^\varepsilon \Pr[M(D')\in S]+\delta.

\]

Here, \(\varepsilon\) controls privacy loss and \(\delta\) permits a small probability of failure; neighboring datasets must be defined explicitly. Privacy accounting is essential when multiple releases or training steps consume a cumulative privacy budget. Differential privacy protects participation at the level specified by the neighboring-dataset definition; it does not guarantee that every individual attribute is impossible to infer.

5. Adversarial Sensitivity and Robustness

A model using a vector representation may be highly sensitive to small input perturbations. For a differentiable scalar function \(f(x)\), the first-order change under perturbation \(\delta\) is approximately

\[

f(x+\delta)-f(x)\approx \nabla f(x)^\top\delta.

\]

If perturbations are constrained by \(\|\delta\|_2\leq \rho\), the maximum first-order change is approximately \(\rho\|\nabla f(x)\|_2\), achieved in the gradient direction. This is a local approximation and may be inaccurate for nonlinear or discontinuous systems.

For a linear classifier with score \(f(x)=w^\top x+b\), the decision boundary is \(w^\top x+b=0\). The Euclidean distance from point \(x\) to the boundary is

\[

\frac{|w^\top x+b|}{\|w\|_2},

\]

provided \(w\neq 0\). This distance is a geometric margin, not a complete robustness guarantee. Data transformations, quantization, preprocessing, distribution shift, and attacks in other norms can change the practical risk.

Robustness evaluation should specify the perturbation model, threat capability, norm or semantic constraint, attack success criterion, and distribution of test cases. Defenses can reduce sensitivity, but robust optimization may lower clean-data accuracy or introduce new vulnerabilities. Security testing should be combined with ordinary reliability testing and monitoring.

6. Numerical Auditability and Governance

6.1 Why numerical details matter

AI systems may produce different results because of floating-point rounding, hardware-specific kernels, parallel reduction order, random seeds, compiler transformations, or changes in preprocessing. A result can be mathematically well-defined but operationally difficult to reproduce.

For floating-point numbers, arithmetic is generally not exact. A common model for one operation is

\[

\operatorname{fl}(a\circ b)=(a\circ b)(1+\epsilon),

\]

where \(|\epsilon|\) is bounded approximately by machine precision under normal, non-underflow conditions. The model is an approximation and does not capture overflow, underflow, cancellation, non-associativity, or exceptional values.

Ill-conditioned problems amplify input or arithmetic errors. For a nonsingular matrix \(A\), the 2-norm condition number is

\[

\kappa_2(A)=\|A\|_2\|A^{-1}\|_2.

\]

A large condition number indicates that small perturbations may cause relatively large changes in the solution of a problem involving \(A\). It is a property of the problem, not simply of the implementation.

6.2 Audit controls

A numerically auditable system should maintain:

  • versioned data and preprocessing definitions;
  • model architecture, parameter, and optimizer specifications;
  • random seeds and software and hardware versions;
  • precision, quantization, and kernel information;
  • checks for NaNs, infinities, overflow, and underflow;
  • validation of matrix dimensions, ranks, and conditioning;
  • tolerance definitions for numerical comparisons;
  • subgroup and stress-test results;
  • records of model changes and approval decisions;
  • monitoring, rollback, and incident-response procedures.

Reproducibility is not always bit-for-bit identity. A responsible report should distinguish exact reproducibility, statistical reproducibility across runs, and conceptual reproducibility using the same method.

6.3 Governance as a technical control system

Governance should connect technical evidence to authority and accountability. Useful controls include data-impact assessments, model cards, dataset documentation, access control, retention limits, independent review, red-team testing, human escalation, and post-deployment monitoring. Governance must identify who may approve a system, who is responsible for errors, which uses are prohibited, and how affected individuals can seek correction or appeal.

7. Mixed-Precision Linear Algebra

Mixed precision uses different numerical formats for different operations. For example, matrix multiplication may use lower precision for speed and memory efficiency, while accumulation, normalization, or updates use higher precision. The exact formats vary by hardware and software ecosystem.

Benefits include lower memory bandwidth, faster computation, and reduced energy use. Risks include overflow, underflow, loss of small differences, inaccurate gradients, and changed convergence behavior. A common safeguard is loss scaling: if a training loss is multiplied by a scale factor before gradient computation, gradients can be represented more safely in a low-precision format; they are then unscaled before parameter updates. The scale must be managed because excessive scaling can overflow and insufficient scaling can leave values underrepresented.

Precision should be selected by sensitivity analysis rather than fashion. Critical operations such as reductions, normalization statistics, ill-conditioned solves, and final safety scores may require higher precision. Testing should compare not only average accuracy but also calibration, rare-event behavior, subgroup performance, stability across hardware, and worst-case numerical errors.

8. Tensor Decomposition and Efficient Models

A tensor is a multidimensional array. Tensor decomposition approximates a large tensor with simpler components. In a CP decomposition, a third-order tensor \(\mathcal{X}\) is approximated as

\[

\mathcal{X}\approx \sum_{r=1}^{R} a_r\circ b_r\circ c_r,

\]

where \(\circ\) denotes the outer product and \(R\) is the chosen rank. In a Tucker decomposition, a core tensor is multiplied by factor matrices along each mode.

Decomposition can reduce storage and computation, but approximation error depends on rank, data structure, and algorithm. A lower rank may improve efficiency while removing rare but important interactions. Factor matrices may also expose sensitive structure or make a model easier to copy. Decomposed models require validation on safety-critical and minority cases, not just aggregate reconstruction error.

In deployment, a useful record includes the original model, decomposition method, selected rank, reconstruction error, downstream performance, and known failure modes. Compression is a change to the model and should be governed like any other model change.

9. Federated Linear Algebra

Federated learning keeps training data on participating devices or institutions while coordinating model updates. In a basic weighted aggregation rule,

\[

w_{t+1}=\sum_{k=1}^{K}\frac{n_k}{\sum_{j=1}^{K}n_j}w_{t+1}^{(k)},

\]

where \(w_{t+1}^{(k)}\) is the locally updated parameter vector for client \(k\), and \(n_k\) is its local sample count. This expression assumes compatible parameter spaces and a coordinator that can receive the updates. It does not by itself provide privacy.

Federated systems face non-independent and non-identically distributed data, unreliable clients, communication constraints, poisoning attacks, and update leakage. Secure aggregation can prevent the server from seeing an individual update, while differential privacy can limit information leakage from aggregate results. These controls introduce utility costs and must be evaluated together.

Federation can improve data governance by reducing central collection, but it does not eliminate governance obligations. Institutions still need agreements about purpose, consent, retention, cross-border transfers, incident response, and accountability.

10. Neuromorphic and Quantum Linear Algebra

10.1 Neuromorphic computation

Neuromorphic systems use event-driven computation inspired by aspects of biological neural processing. Sparse spikes may reduce energy when inputs and activations are sparse. Matrix-like operations are often implemented through synaptic weights and accumulations rather than conventional dense floating-point kernels.

The main challenges include training methods, hardware variability, limited precision, programming tools, and translating conventional models to spike-based representations. Responsible evaluation should measure energy per inference, latency, accuracy, robustness to hardware variation, and accessibility of development tools. Lower energy consumption is valuable, but it does not automatically imply lower environmental impact if manufacturing, replacement, and total lifecycle costs are ignored.

10.2 Quantum linear algebra

Quantum algorithms represent information in quantum states and may offer theoretical speedups for selected linear-algebraic tasks under strong assumptions. A well-known example is solving systems related to \(Ax=b\), but claimed advantages depend on conditions such as efficient state preparation, suitable sparsity or structure, favorable condition number, fault-tolerant hardware, and an efficient method for extracting the desired output. Reading out a full classical vector can remove the apparent advantage.

Quantum methods are not a general replacement for classical matrix computation. They are an emerging research area requiring careful distinction between asymptotic complexity, end-to-end runtime, input-output costs, hardware feasibility, and practical error correction. Governance should prevent speculative performance claims from being treated as established operational capability.

11. An Illustrative Case: Hospital Readmission Embeddings

Background

A hospital consortium develops patient embeddings from diagnosis codes, medication histories, laboratory measurements, and clinical notes. The embeddings are used to predict 30-day readmission and to identify patients for follow-up support. The consortium plans to reduce dimensionality and deploy the model across hospitals.

Problem

Initial validation shows high overall area under the receiver operating characteristic curve, but performance is lower for patients who speak less common languages and for patients treated at smaller hospitals. Security testing finds that an attacker can infer whether some rare diagnoses appeared in the training data. A deployment team also discovers that two hardware platforms produce slightly different rankings for patients near the intervention threshold.

Analysis

The representation may contain historical access patterns rather than only clinical need. Smaller hospitals may be underrepresented, and language-related features may act as proxies for demographic and socioeconomic variables. PCA may preserve dominant patterns from large hospitals while discarding clinically important variation in smaller facilities. The privacy finding indicates that the embedding is not automatically anonymous. Numerical differences near a decision threshold may produce unequal access to follow-up care.

Approach

The consortium establishes a model governance group including clinicians, privacy specialists, statisticians, patient representatives, and security engineers. It:

1. audits data coverage and missingness by hospital, language, age, and other relevant groups;

2. evaluates subgroup calibration, false-negative rates, and clinical utility;

3. tests attribute and membership inference against embeddings;

4. compares PCA with supervised and group-aware alternatives, documenting trade-offs;

5. applies access controls, retention limits, and a formally analyzed privacy mechanism where appropriate;

6. defines numerical tolerances and uses a stable decision policy for borderline cases;

7. pilots the system with human review and an appeal route;

8. monitors drift and performance after deployment.

Outcome

The consortium does not select the model with the highest aggregate score. It selects a slightly less accurate model overall that has better subgroup recall, clearer documentation, and lower privacy risk. It also limits use to care coordination rather than insurance eligibility or disciplinary decisions. The system is approved only with monitoring, periodic review, and a rollback plan.

Learning points

This case illustrates that responsible linear algebra involves representation design, privacy analysis, numerical testing, institutional governance, and purpose limitation. No single projection, fairness metric, or privacy tool resolves all concerns.

12. Challenges, Limitations, and Future Requirements

Responsible practice faces several enduring difficulties. Fairness criteria can conflict, and there is no universally correct metric independent of context. Privacy is difficult to guarantee when auxiliary information exists. Robustness evaluations may miss unknown attack strategies. Numerical reproducibility can conflict with speed and hardware optimization. Compression and low precision can improve sustainability while harming rare-case performance. Federated systems distribute trust but do not eliminate malicious participants or institutional power imbalances.

Future AI systems will require:

  • representations whose provenance, intended use, and limitations are documented;
  • evaluation across demographic, geographic, linguistic, and intersectional groups;
  • privacy guarantees connected to explicit threat models;
  • robustness testing under both mathematical and semantic perturbations;
  • precision-aware and hardware-aware reproducibility standards;
  • energy and lifecycle reporting;
  • interoperable audit logs and model documentation;
  • human oversight proportionate to potential harm;
  • clear mechanisms for correction, explanation, and appeal;
  • education that combines mathematical competence with ethics, law, security, and domain expertise.

The future of linear algebra for AI is therefore not only about larger matrices or faster decompositions. It is about building computational systems whose representations can be questioned, whose limitations can be measured, and whose uses remain accountable.

Best-Practice Checklist

Before approving an AI system based substantially on vector or matrix representations, ask:

1. What population and process generated the data?

2. Which groups are poorly represented or measured differently?

3. What information is preserved, discarded, or inferable?

4. Have subgroup, privacy, robustness, and numerical tests been conducted?

5. Are precision, conditioning, random seeds, and software versions recorded?

6. Are model compression and hardware changes revalidated?

7. Is the intended use narrower than or different from possible misuse?

8. Who is accountable for approval, monitoring, and remediation?

9. Can an affected person challenge or correct an outcome?

10. Is there a documented rollback and incident-response plan?

Chapter Summary

Responsible AI practice requires treating embeddings, projections, decompositions, and numerical computations as socio-technical components rather than neutral mathematical objects. Bias can arise from data, measurement, representation, objectives, and deployment. Geometry provides useful diagnostics such as projections, neighborhoods, and subgroup distances, but no single geometric test proves fairness.

Dimensionality reduction preserves the criterion it optimizes; PCA preserves high variance, not necessarily minority information, privacy, or equity. Embeddings may leak membership or attributes, and privacy mechanisms require explicit definitions, threat models, and accounting. Adversarial sensitivity can be analyzed locally through gradients and margins, but robust evaluation must specify realistic perturbations.

Numerical auditability depends on recording precision, conditioning, software, hardware, randomness, tolerances, and failure checks. Mixed precision and tensor decomposition can improve efficiency but may alter accuracy and rare-case behavior. Federated methods reduce central data collection but still require secure aggregation, privacy analysis, and governance. Neuromorphic and quantum linear algebra offer promising directions, yet claims must be evaluated against hardware, input-output, energy, and error-correction realities.

The central professional requirement is accountable engineering: measure impacts, document assumptions, involve affected stakeholders, monitor deployment, and provide correction and appeal mechanisms.

Key Terms

Embedding: A mapping of an object into a numerical vector space.

Cosine similarity: The dot product of two nonzero vectors divided by the product of their Euclidean norms.

Representation bias: Bias caused by unequal or inadequate representation of populations or phenomena.

Dimensionality reduction: Transforming data into fewer coordinates while preserving a selected property.

Principal component analysis: A method that finds orthogonal directions of greatest variance in centered data.

Projection: Mapping a vector onto a subspace or direction.

Privacy leakage: Unintended disclosure or inference of sensitive information.

Membership inference: Inferring whether a record was included in training data.

Differential privacy: A formal privacy framework that bounds the effect of one individual’s participation on output distributions.

Adversarial sensitivity: Susceptibility of a model to carefully selected small perturbations.

Condition number: A measure of how sensitive a numerical problem is to perturbations.

Numerical auditability: The ability to inspect, reproduce, and evaluate computational numerical behavior.

Mixed precision: Using multiple numerical precisions within a computation or training process.

Tensor decomposition: Approximating a multidimensional array using lower-complexity factors.

Federated learning: Collaborative model training in which data remain at participating clients or institutions.

Secure aggregation: A protocol designed to reveal an aggregate of updates without exposing each individual update.

Neuromorphic computing: Computing based on event-driven, brain-inspired hardware or representations.

Quantum linear algebra: Linear-algebraic computation using quantum states and quantum algorithms.

Model governance: Policies, roles, controls, and processes that manage an AI system throughout its lifecycle.

Review Questions

Short Answer Questions

1. Why does removing an explicit demographic variable not necessarily remove bias from an embedding?

2. What does PCA optimize, and why might that objective disadvantage a minority group?

3. Define membership inference in the context of machine-learning representations.

4. What information is required to interpret a condition number responsibly?

5. Why does federated learning not automatically guarantee privacy?

Long Answer Questions

1. Explain how bias can arise at multiple stages of an embedding pipeline and propose a corresponding audit plan.

2. Compare dimensionality reduction, additive noise, and access control as approaches to reducing privacy risk.

3. Discuss the benefits and limitations of mixed-precision computation for AI training and inference.

4. Explain why numerical reproducibility is a governance issue rather than only a software-engineering issue.

5. Compare federated, neuromorphic, and quantum approaches according to their promises, assumptions, and limitations.

Analytical / Application Questions

1. A PCA-based clinical model performs well overall but poorly for a small hospital. Design an analysis to determine whether the dimensionality-reduction step contributes to the disparity.

2. A linear classifier has score \(f(x)=w^\top x+b\), with \(w=(3,4)\), \(b=-10\), and input \(x=(2,3)\). Calculate the Euclidean distance from \(x\) to the decision boundary and explain what the result does and does not establish about robustness.

3. Design a governance plan for deploying a compressed, mixed-precision model through federated learning in a regulated domain. Identify at least four technical risks and the control for each.

Multiple Choice Questions with Answers

Question 1

Which property does standard PCA primarily optimize?

A. Equal error rates across demographic groups

B. Maximum variance in selected orthogonal directions

C. Differential privacy for every individual

D. Resistance to all adversarial perturbations

Correct Answer: B. Maximum variance in selected orthogonal directions

Question 2

What does membership inference attempt to determine?

A. Whether a record was included in training data

B. The rank of a covariance matrix

C. The energy use of a processor

D. Whether a matrix is symmetric

Correct Answer: A. Whether a record was included in training data

Question 3

For nonzero vectors x and y, cosine similarity is defined as:

A. xᵀy

B. ||x−y||₂

C. (xᵀy)/(||x||₂||y||₂)

D. ||x||₂+||y||₂

Correct Answer: C. (xᵀy)/(||x||₂||y||₂)

Question 4

In the expression P = I − UUᵀ, which condition makes P an orthogonal projection removing the columns of U?

A. UᵀU = I

B. UUᵀ = 0 for every U

C. U must be square and diagonal

D. U must contain only positive entries

Correct Answer: A. UᵀU = I

Question 5

What is a principal risk of using lower precision without adequate safeguards?

A. It guarantees exact arithmetic

B. It can cause overflow, underflow, or loss of important small differences

C. It eliminates the need for validation

D. It always increases model size

Correct Answer: B. It can cause overflow, underflow, or loss of important small differences

Question 6

What does a large condition number generally indicate?

A. The problem may be sensitive to small perturbations

B. The matrix must be sparse

C. The data are automatically private

D. The algorithm is immune to rounding error

Correct Answer: A. The problem may be sensitive to small perturbations

Question 7

Which statement about federated learning is correct?

A. Keeping raw data local automatically prevents update leakage

B. Federated learning requires all clients to have identical data distributions

C. Federated learning can require secure aggregation and privacy analysis

D. Federated learning eliminates the need for governance

Correct Answer: C. Federated learning can require secure aggregation and privacy analysis

Question 8

For w=(3,4), b=−10, and x=(2,3), what is the distance from x to the boundary wᵀx+b=0?

A. 1

B. 2

C. 3

D. 5

Correct Answer: A. 1

Question 9

Which condition is especially important when interpreting a proposed quantum speedup for linear algebra?

A. Whether full classical output can be extracted efficiently

B. Whether the input is written in a spreadsheet

C. Whether all matrices are diagonal

D. Whether no error correction is needed

Correct Answer: A. Whether full classical output can be extracted efficiently

Question 10

Why should compressed or decomposed models be revalidated after deployment changes?

A. Compression can alter rare-case behavior and downstream performance

B. Decomposition always changes the labels

C. Validation is needed only for uncompressed models

D. Low-rank models cannot be audited

Correct Answer: A. Compression can alter rare-case behavior and downstream performance

Linear Algebra for AI
Chapter 15 of 15