MATH-17 · LINEAR ALGEBRA

특잇값 분해와 저차원 근사SVD and low-rank approximation

직사각형 변환에서 절단·의사역행렬·실제 자료 복원까지From rectangular maps to truncation, pseudoinverses and actual-data reconstruction

실습 6종 · 풀이 포함 연습문제 35개6 labs · 35 exercises with solutions

기초Foundations

1. 직사각형 표에도 입력 방향과 출력 방향이 있다1. Rectangular tables also have input and output directions

여러 특성으로 여러 출력을 만드는 표는 정방행렬일 필요가 없습니다. 앞 장의 고유벡터처럼 입력과 출력에 같은 벡터를 쓸 수 없어도, 어떤 입력방향을 얼마나 늘여 어느 출력방향으로 보내는지 물을 수 있습니다. 이 질문에 답하는 것이 특잇값 분해입니다.

사진 압축이나 자료 요약이라는 이름부터 외우기보다, 원래 행렬을 어떤 조각으로 표현하고 무엇을 버리는지 이해하겠습니다. 버린 조각은 수학적 근사오차가 되며, 자동으로 측정잡음이라고 판정된 것은 아닙니다.

A feature-to-output table need not be square. Even when the same vector cannot fit both sides of an eigenvector equation, we can ask which input directions are stretched by how much and into which output directions. SVD answers this question.

Understand the pieces and discarded information before memorizing “compression.” Discarded components create approximation error; they are not automatically identified as measurement noise.

기초Foundations

2. A=UΣVᵀ: 서로 다른 두 공간의 직교축2. A=UΣVᵀ uses orthogonal axes in two spaces

양의 정수 m,n에 대해 실수 m×n 행렬 A는 A=UΣVᵀ로 쓸 수 있습니다. U는 m×m 직교행렬, V는 n×n 직교행렬이고 Σ는 m×n입니다. Σ의 주대각 숫자는 음수가 아니며 큰 순서로 σ₁≥⋯≥σ_q≥0, q=min(m,n)이라 씁니다.

A=UΣVT,UTU=Im,VTV=In,σ1≥⋯≥σq≥0, q=min⁡(m,n)A=U\Sigma V^\mathsf T,\qquad U^\mathsf TU=I_m,\quad V^\mathsf TV=I_n,\qquad \sigma_1\ge\cdots\ge\sigma_q\ge0,\ q=\min(m,n)

σ를 특잇값, U의 열을 왼쪽 특이벡터, V의 열을 오른쪽 특이벡터라고 부릅니다. 이 장에서는 오른쪽이 입력 ℝⁿ, 왼쪽이 출력 ℝᵐ입니다. 행과 열을 바꾸어 설명하면 서로 다른 공간을 뒤섞게 됩니다.

모든 실수 행렬에 이런 분해가 존재합니다. 정방행렬이 아니거나, 고유값이 복소수이거나, 대각화가 실패하는 행렬에도 적용됩니다. 16장의 고유값 대각화와 같은 분해라고 가정하지 마세요.

For positive integers m,n, every real m×n matrix has A=UΣVᵀ, where U is m×m orthogonal, V is n×n orthogonal, and Σ is m×n with nonnegative ordered diagonal entries. Write q=min(m,n).

A=UΣVT,UTU=Im,VTV=In,σ1≥⋯≥σq≥0, q=min⁡(m,n)A=U\Sigma V^\mathsf T,\qquad U^\mathsf TU=I_m,\quad V^\mathsf TV=I_n,\qquad \sigma_1\ge\cdots\ge\sigma_q\ge0,\ q=\min(m,n)

The σ values are singular values. Columns of V are right singular vectors in input space ℝⁿ; columns of U are left singular vectors in output space ℝᵐ.

SVD exists even for rectangular matrices and square matrices with complex eigenvalues or no full eigenbasis. It is not the same decomposition as eigenvalue diagonalization.

기초Foundations

3. 입력축으로 읽고·늘이고·출력축으로 돌려놓기3. Read input coordinates, stretch, then restore output coordinates

Ax를 계산할 때 먼저 Vᵀx로 입력의 직교좌표를 읽습니다. Σ는 그 좌표를 σ만큼 늘이거나 지웁니다. U는 결과를 출력공간의 좌표로 돌려놓습니다. U,V는 회전뿐 아니라 반사도 포함할 수 있어 둘 다 단순히 회전이라고만 부르지는 않습니다.

x→VTz→Σw→UAx\mathbf x\xrightarrow{V^\mathsf T}\mathbf z\xrightarrow{\Sigma}\mathbf w\xrightarrow{U}A\mathbf x

2차원 실습은 세 단계와 최종 Ax를 나란히 비교합니다. 직교단계는 길이를 보존하고 가운데 배율단계가 길이를 바꿉니다. 직사각형에서는 가운데 단계가 n개 좌표를 m개로 옮기므로 그림의 차원도 달라질 수 있습니다.

음의 고유값을 가진 diag(3,−2)도 SVD에서는 특잇값 3,2를 씁니다. 음의 부호는 U의 둘째 방향을 뒤집어 기록하면 됩니다. 음수 특잇값을 만들 필요가 없습니다.

First Vᵀ reads orthogonal input coordinates; Σ stretches or deletes them; U restores output coordinates. Orthogonal factors can include reflections, not just rotations.

x→VTz→Σw→UAx\mathbf x\xrightarrow{V^\mathsf T}\mathbf z\xrightarrow{\Sigma}\mathbf w\xrightarrow{U}A\mathbf x

Compare all three stages with direct Ax. Orthogonal steps preserve length; the middle step changes it. For rectangular maps, that step also connects different coordinate dimensions.

Even diag(3,−2) has nonnegative singular values 3 and 2. A sign reversal in the corresponding U direction accounts for the negative eigenvalue.

기초Foundations

4. Avᵢ=σᵢuᵢ라는 두 방향의 짝4. Avᵢ=σᵢuᵢ pairs input and output directions

오른쪽 특이벡터 vᵢ를 입력하면 출력은 σᵢuᵢ입니다. 고유벡터와 달리 uᵢ와 vᵢ가 서로 같을 필요가 없습니다. Aᵀuᵢ=σᵢvᵢ도 함께 성립합니다.

Avi=σiui,ATui=σiviA\mathbf v_i=\sigma_i\mathbf u_i,\qquad A^\mathsf T\mathbf u_i=\sigma_i\mathbf v_i

직사각형 2×1 열 A=(5,12)ᵀ에서는 σ=13, 입력방향 v=(1), 출력 단위방향 u=(5/13,12/13)ᵀ입니다. 서로 다른 차원의 공간이므로 ‘입력벡터와 출력벡터가 같아야 한다’고 요구할 수 없습니다.

위 식의 첨자 i는 양쪽에 짝지은 q개 특이방향을 뜻합니다. 전체 U,V의 추가 열이 있다면 모두 같은 수의 양수 특잇값을 갖는다는 뜻은 아닙니다. 모양과 0방향은 다음 절에서 구별합니다.

An input right singular vector produces σᵢuᵢ, with Aᵀuᵢ=σᵢvᵢ as well. Input and output directions need not be the same vector.

Avi=σiui,ATui=σiviA\mathbf v_i=\sigma_i\mathbf u_i,\qquad A^\mathsf T\mathbf u_i=\sigma_i\mathbf v_i

For the 2×1 column (5,12)ᵀ, use σ=13, v=(1), and u=(5/13,12/13)ᵀ. Input and output spaces have different dimensions.

These equations concern q paired directions. Extra columns in full factors do not create additional positive singular values.

기초Foundations

5. 전체형·축소형·랭크형은 크기를 함께 적는다5. State shapes for full, reduced and rank-r forms

q=min(m,n)와 r=rank(A)는 다릅니다. q는 표의 모양으로 정해지고 r은 양수 특잇값의 개수입니다. 랭크결손이면 r<q입니다. ‘얇은 SVD’라는 이름은 자료마다 다르게 쓰일 수 있어 여기서는 크기를 명시합니다.

A=UqΣqVqT,Uq:m×q, Σq:q×q, Vq:n×q;A=UrΣrVrT(σ1,…,σr>0)A=U_q\Sigma_qV_q^\mathsf T,\quad U_q:m\times q,\ \Sigma_q:q\times q,\ V_q:n\times q;\qquad A=U_r\Sigma_rV_r^\mathsf T\quad(\sigma_1,\ldots,\sigma_r>0)

q형은 0 특잇값까지 포함할 수 있습니다. r형은 양수 항만 남기며 Uᵣ는 m×r, Vᵣ는 n×r입니다. 둘 다 A를 정확히 복원합니다. 0행렬은 r=0인 빈 합으로 표현하고 결과를 원래 크기의 0행렬로 읽습니다.

예를 들어 5×2 랭크 1 표는 전체 U가 5×5, q형 U가 5×2, r형 U가 5×1입니다. 축소형의 UᵀU=I는 성립해도 UUᵀ가 항상 I₅라는 뜻은 아닙니다.

Distinguish q=min(m,n), determined by shape, from r=rank(A), the number of positive singular values. Terminology such as “thin” varies, so specify dimensions.

A=UqΣqVqT,Uq:m×q, Σq:q×q, Vq:n×q;A=UrΣrVrT(σ1,…,σr>0)A=U_q\Sigma_qV_q^\mathsf T,\quad U_q:m\times q,\ \Sigma_q:q\times q,\ V_q:n\times q;\qquad A=U_r\Sigma_rV_r^\mathsf T\quad(\sigma_1,\ldots,\sigma_r>0)

The q-form may retain zero singular values; the rank-r form keeps only positive ones. Both reconstruct A exactly. A zero matrix uses an empty rank-zero sum of its original shape.

For a rank-one 5×2 matrix, full U is 5×5, reduced U is 5×2, and compact U is 5×1. Orthogonal columns do not make every reduced UUᵀ the full identity.

기초Foundations

6. AᵀA의 고유값에서 σ의 제곱이 나온다6. AᵀA eigenvalues are squared singular values

SVD를 대입하면 AᵀA=VΣᵀΣVᵀ입니다. 가운데 대각에는 σᵢ²가 있고 나머지는 0입니다. 따라서 오른쪽 특이벡터는 AᵀA의 고유벡터입니다. AAᵀ에서는 왼쪽 특이벡터를 얻습니다.

ATAvi=σi2vi,AATui=σi2uiA^\mathsf TA\mathbf v_i=\sigma_i^2\mathbf v_i,\qquad AA^\mathsf T\mathbf u_i=\sigma_i^2\mathbf u_i

m<n이면 AᵀA는 n×n이어서 특잇값 목록 q개보다 0 고유값이 더 있을 수 있습니다. 양수 고유값은 두 Gram 행렬에서 같지만 전체 0의 개수와 좌표공간은 다릅니다.

이 관계는 이론적 유도입니다. 작은 특잇값을 알고 싶다고 항상 AᵀA를 먼저 계산하는 것이 좋은 수치알고리즘은 아닙니다. 제곱이 조건을 나쁘게 만드는 이유를 22절에서 다룹니다.

Substitution gives AᵀA=VΣᵀΣVᵀ, so right singular vectors are Gram eigenvectors with values σᵢ². AAᵀ similarly gives left vectors.

ATAvi=σi2vi,AATui=σi2uiA^\mathsf TA\mathbf v_i=\sigma_i^2\mathbf v_i,\qquad AA^\mathsf T\mathbf u_i=\sigma_i^2\mathbf u_i

If m<n, the n×n Gram matrix can have additional zero eigenvalues beyond the q listed singular values. Positive values match across both Gram matrices; zero counts and coordinate spaces differ.

This theoretical relationship does not require computing SVD numerically through a preformed Gram matrix. Squaring can worsen conditioning.

기초Foundations

7. 양수 방향을 만들면 SVD의 존재가 보인다7. Constructing positive directions explains SVD existence

실수 대칭 PSD인 AᵀA의 정규직교 고유기저를 고릅니다. 양수 고유값 λᵢ에 대해 σᵢ=√λᵢ, uᵢ=Avᵢ/σᵢ로 정합니다. 0 특잇값으로는 나누지 않습니다.

uiTuj=viTATAvjσiσj={1i=j0i≠j(σi,σj>0)\mathbf u_i^\mathsf T\mathbf u_j=\frac{\mathbf v_i^\mathsf TA^\mathsf TA\mathbf v_j}{\sigma_i\sigma_j}=\begin{cases}1&i=j\\0&i\ne j\end{cases}\quad(\sigma_i,\sigma_j>0)

이렇게 만든 u들의 길이는 1이고 서로 직교합니다. λ=0인 방향은 ‖Av‖²=vᵀAᵀAv=0이므로 Av=0입니다. 양수 방향만으로 A가 하는 일을 모두 표현할 수 있습니다.

필요하면 u와 v의 나머지를 정규직교기저로 채워 전체형을 만듭니다. 0방향을 채우는 선택은 유일하지 않습니다. 이 유도는 16장의 대칭 스펙트럼 정리에 기대며 일반 비대칭 고유분해를 요구하지 않습니다.

Choose an orthonormal eigenbasis of the symmetric PSD matrix AᵀA. For λᵢ>0, set σᵢ=√λᵢ and uᵢ=Avᵢ/σᵢ, never dividing by zero singular values.

uiTuj=viTATAvjσiσj={1i=j0i≠j(σi,σj>0)\mathbf u_i^\mathsf T\mathbf u_j=\frac{\mathbf v_i^\mathsf TA^\mathsf TA\mathbf v_j}{\sigma_i\sigma_j}=\begin{cases}1&i=j\\0&i\ne j\end{cases}\quad(\sigma_i,\sigma_j>0)

The constructed u vectors are orthonormal. Zero Gram values imply ‖Av‖²=0, so those inputs are erased. Positive pairs therefore describe the entire action.

Complete the remaining orthonormal bases for a full factorization; zero-direction completions are nonunique. This construction uses the symmetric spectral theorem, not a general nonsymmetric eigenbasis.

기초Foundations

8. 고유값과 특잇값을 같은 수로 외우지 않기8. Do not equate eigenvalues and singular values generally

실수 대칭 A에서는 특잇값이 고유값의 절대값을 큰 순서로 정렬한 것입니다. PSD이면 고유값이 이미 비음수라 두 목록이 같습니다. 그러나 일반 비대칭행렬에서는 이 규칙이 없습니다.

N=[[0,1],[0,0]]은 고유값이 모두 0이지만 NᵀN=diag(0,1)이므로 특잇값은 1,0입니다. 90° 회전은 고유값이 ±i지만 특잇값은 1,1입니다. 회전이 모든 길이를 보존하기 때문입니다.

특잇값은 어떤 단위 입력을 얼마나 크게 만드는지와 관련됩니다. 고유값은 같은 직선으로 돌아오는 배율입니다. 두 질문이 같아지는 특별한 조건과 다른 일반 상황을 분리하세요.

For real symmetric A, singular values are sorted absolute eigenvalues. For PSD A, the nonnegative eigenvalues already match. General nonsymmetric matrices have no such rule.

The nilpotent matrix [[0,1],[0,0]] has only zero eigenvalues but singular values 1 and 0. A 90-degree rotation has complex eigenvalues ±i but singular values 1 and 1 because it preserves lengths.

Singular values concern input-output stretching; eigenvalues concern returning to the same eigenline. Separate these questions and their special coincidences.

기초Foundations

9. 부호와 중복 특잇값의 비유일성9. Sign and repeated-value nonuniqueness

양수 σᵢ의 uᵢ와 vᵢ를 동시에 음수로 바꾸면 σᵢuᵢvᵢᵀ는 같습니다. 한쪽만 바꾸면 일반적으로 A가 달라집니다. 다른 프로그램 결과를 비교할 때 짝의 부호를 함께 봅니다.

σi(−ui)(−vi)T=σiuiviT\sigma_i(-\mathbf u_i)(-\mathbf v_i)^\mathsf T=\sigma_i\mathbf u_i\mathbf v_i^\mathsf T

같은 특잇값이 반복되면 그 블록의 양쪽 기저를 같은 직교변환으로 섞어도 됩니다. 순서·부호·기저 모양이 달라도 복원행렬과 해당 공간이 같을 수 있습니다. 고유벡터 때와 비슷하지만 입력·출력 두 목록을 함께 다룹니다.

특잇값의 정렬은 값과 양쪽 벡터를 함께 옮겨야 합니다. SVD 결과가 재현되었는지 볼 때 원래 A와의 복원오차, 두 기저의 직교성, 일치하는 부분공간을 검산합니다.

Flipping both uᵢ and vᵢ preserves a positive singular component. Flipping only one generally changes A.

σi(−ui)(−vi)T=σiuiviT\sigma_i(-\mathbf u_i)(-\mathbf v_i)^\mathsf T=\sigma_i\mathbf u_i\mathbf v_i^\mathsf T

Repeated singular values allow matching orthogonal basis changes on both sides. Different signs or bases may reconstruct the same matrix and subspaces.

Move values and both vector lists together when sorting. Verify reconstruction and orthogonality rather than demanding identical coordinates from every library.

기초Foundations

10. 정확한 랭크와 수치 랭크를 구별하기10. Distinguish exact rank from numerical rank

정확한 랭크는 양수 특잇값 개수 r입니다. diag(1,10⁻¹²)는 작은 두 번째 값도 0이 아니므로 정확한 랭크 2입니다. 이것을 랭크 1로 다루고 싶다면 목적과 척도에 맞는 임계값을 추가한 것입니다.

r=#{i:σi>0},rτ=#{i:σi>τ}(τ≥0)r=\#\{i:\sigma_i>0\},\qquad r_\tau=\#\{i:\sigma_i>\tau\}\quad(\tau\ge0)

실습은 정확한 대각값과 정한 τ 아래의 수치 분류를 나란히 보여 줍니다. τ와 정확히 같은 값을 포함할지 같은 경계규칙도 표시합니다. 위 식은 엄격한 >를 사용합니다.

자료의 단위가 달라지면 절대 임계값의 의미도 달라집니다. 상대기준 τ=cσ₁과 절대기준을 구별하세요. 랭크를 낮춘 판단이 원래 행렬의 작은 성분을 정확한 0으로 증명한 것은 아닙니다.

Exact rank counts strictly positive singular values. diag(1,10⁻¹²) has exact rank two. Treating it as rank one adds a threshold policy.

r=#{i:σi>0},rτ=#{i:σi>τ}(τ≥0)r=\#\{i:\sigma_i>0\},\qquad r_\tau=\#\{i:\sigma_i>\tau\}\quad(\tau\ge0)

Compare exact diagonal rank with a selected threshold. State boundary behavior; the displayed rule retains strictly greater values.

Absolute thresholds depend on units. Distinguish relative thresholds from absolute ones, and numerical simplification from proving an original component exactly zero.

기초Foundations

11. 네 공간과 남는 정보·지워지는 정보11. Four spaces separate retained and erased information

양수 특잇값의 u₁,…,uᵣ는 Col(A)의 기저이고 v₁,…,vᵣ는 행공간 Col(Aᵀ)의 기저입니다. V에서 남은 n−r개 방향은 Null(A), U에서 남은 m−r개 방향은 Null(Aᵀ)를 채웁니다.

Col⁡(A)=span⁡(Ur),Col⁡(AT)=span⁡(Vr),Null⁡(A)=span⁡(vr+1,…,vn)\operatorname{Col}(A)=\operatorname{span}(U_r),\quad\operatorname{Col}(A^\mathsf T)=\operatorname{span}(V_r),\quad\operatorname{Null}(A)=\operatorname{span}(\mathbf v_{r+1},\ldots,\mathbf v_n)

왜 오른쪽 0방향이 영공간인지 Av=0으로 확인합니다. 왼쪽 0방향은 모든 출력열과 직교합니다. 15장의 열공간과 직교여공간을 두 쪽에서 한꺼번에 읽게 된 것입니다.

‘U가 행공간, V가 열공간’이라고 외우면 역할이 바뀝니다. 반드시 실제 m,n 크기와 어느 곱이 0인지로 점검하세요. 전체형의 추가 0방향을 축소형에서 생략했다면 그 목록만으로 모든 영공간 기저를 출력했다고 할 수도 없습니다.

Positive-pair u vectors span Col(A), and v vectors span the row space Col(Aᵀ). Remaining full V columns span Null(A); remaining full U columns span Null(Aᵀ).

Col⁡(A)=span⁡(Ur),Col⁡(AT)=span⁡(Vr),Null⁡(A)=span⁡(vr+1,…,vn)\operatorname{Col}(A)=\operatorname{span}(U_r),\quad\operatorname{Col}(A^\mathsf T)=\operatorname{span}(V_r),\quad\operatorname{Null}(A)=\operatorname{span}(\mathbf v_{r+1},\ldots,\mathbf v_n)

Verify right null directions through Av=0; left null directions are orthogonal to every output column. This unifies the two-sided spaces from Chapter 15.

Check shapes instead of reversing U and V roles by memory. Reduced factors that omit extra zero directions do not by themselves list every null-space basis vector.

기초Foundations

12. 가장 큰 늘어남과 전체 제곱량12. Maximum stretching and total squared size

단위 입력 x의 출력 길이를 가장 크게 만드는 값이 행렬의 2노름, 스펙트럼 노름입니다. SVD 좌표에서 ‖Ax‖²=Σσᵢ²zᵢ²이므로 제곱출력의 최대는 σ₁²입니다. 제곱근을 취하면 출력길이의 최대가 σ₁입니다. 영행렬에서는 0입니다.

∥A∥2=σ1,∥A∥F2=∑ijaij2=∑iσi2\|A\|_2=\sigma_1,\qquad \|A\|_F^2=\sum_{ij}a_{ij}^2=\sum_i\sigma_i^2

모든 칸의 제곱을 더한 제곱근은 Frobenius 노름입니다. 직교변환은 각 열이나 행의 길이를 보존하므로 전체 제곱합도 보존하며, 대각 Σ의 제곱합으로 바꾸어 셀 수 있습니다.

diag(3,1)에서 2노름은 3, Frobenius 노름은 √10입니다. 둘은 어떤 오차를 측정하는지 다른 규칙입니다. ‘행렬오차가 1’이라고만 하지 말고 노름과 제곱 여부를 함께 적어야 합니다.

The spectral 2-norm is maximum output length over unit inputs. SVD coordinates give maximum squared length σ₁²; taking the nonnegative square root gives maximum length σ₁. It is zero for a zero matrix.

∥A∥2=σ1,∥A∥F2=∑ijaij2=∑iσi2\|A\|_2=\sigma_1,\qquad \|A\|_F^2=\sum_{ij}a_{ij}^2=\sum_i\sigma_i^2

The Frobenius norm is the square root of all squared entries. Orthogonal transformations preserve this total, reducing its calculation to squared singular values.

For diag(3,1), these norms are 3 and √10. State the norm and whether it is squared whenever reporting matrix approximation error.

기초Foundations

13. 랭크 1 조각들을 더해 행렬 만들기13. Build a matrix from rank-one outer products

단위 열벡터 uᵢ와 vᵢ의 외적 uᵢvᵢᵀ는 m×n 행렬입니다. 입력 x를 넣으면 uᵢ(vᵢᵀx)라 모든 출력이 uᵢ 방향에 있습니다. σᵢ>0이면 이 조각의 랭크는 1입니다.

A=∑i=1rσiuiviTA=\sum_{i=1}^{r}\sigma_i\mathbf u_i\mathbf v_i^\mathsf T

diag(3,1)은 3e₁e₁ᵀ+e₂e₂ᵀ입니다. [[2,1],[1,2]]는 3q₊q₊ᵀ+q₋q₋ᵀ입니다. 조각별 행렬을 직접 더해 원래 네 칸을 복원해 보세요.

외적과 내적의 결과 종류를 구별합니다. vᵀx는 스칼라이고 uvᵀ는 행렬입니다. 0 특잇값 조각은 0행렬이므로 랭크 1이라고 세지 않습니다.

The outer product uᵢvᵢᵀ is m×n. Applied to x, it gives uᵢ(vᵢᵀx), always along one output direction. A positive singular coefficient makes this a rank-one component.

A=∑i=1rσiuiviTA=\sum_{i=1}^{r}\sigma_i\mathbf u_i\mathbf v_i^\mathsf T

For diag(3,1), the components are 3e₁e₁ᵀ and e₂e₂ᵀ. For [[2,1],[1,2]], they are 3q₊q₊ᵀ and q₋q₋ᵀ. Add their entries to reconstruct the matrix.

An inner product is scalar; an outer product is a matrix. A zero-coefficient component has rank zero, not one.

기초Foundations

14. k개 조각만 남긴 저랭크 근사14. Keep k components for a low-rank approximation

큰 특잇값부터 k개만 남긴 Aₖ를 생각합니다. 0≤k≤q인 정수이고 k=0이면 원래 크기의 0행렬입니다. 양수 항을 모두 남기면 A를 정확히 복원합니다.

Ak=∑i=1kσiuiviT,∥A−Ak∥F2=∑i>kσi2,∥A−Ak∥2=σk+1A_k=\sum_{i=1}^{k}\sigma_i\mathbf u_i\mathbf v_i^\mathsf T,\qquad \|A-A_k\|_F^2=\sum_{i>k}\sigma_i^2,\qquad \|A-A_k\|_2=\sigma_{k+1}

마지막 식에서 k=q이면 남은 특잇값이 없으므로 오차 0으로 읽습니다. 서로 다른 조각은 Frobenius 내적에서도 직교하므로 버린 제곱량이 그대로 더해집니다.

diag(3,1)의 rank-1 근사는 diag(3,0)이고 제곱 Frobenius 오차는 1입니다. 모든 칸을 일정 비율로 줄이는 것과 다릅니다. 실습에서는 원래 표·근사표·차이표와 버린 제곱량을 함께 읽습니다.

Keep the k largest components, with integer 0≤k≤q. At k=0, use a zero matrix of the original shape. Retaining every positive component reconstructs A.

Ak=∑i=1kσiuiviT,∥A−Ak∥F2=∑i>kσi2,∥A−Ak∥2=σk+1A_k=\sum_{i=1}^{k}\sigma_i\mathbf u_i\mathbf v_i^\mathsf T,\qquad \|A-A_k\|_F^2=\sum_{i>k}\sigma_i^2,\qquad \|A-A_k\|_2=\sigma_{k+1}

At k=q there is no remaining singular value and the error is zero. Distinct rank-one components are Frobenius-orthogonal, so their discarded squared sizes add.

For diag(3,1), rank-one truncation is diag(3,0), with squared Frobenius error one. Compare original, approximation and residual tables rather than interpreting this as uniform entry scaling.

기초Foundations

15. Eckart–Young 정리: 정한 랭크 안에서 가장 가깝다15. Eckart–Young: closest under a rank limit

랭크가 k 이하인 모든 행렬 B 중 Aₖ는 Frobenius 노름과 스펙트럼 2노름에서 각각 최소오차를 줍니다. 같은 크기·같은 노름·랭크 제한이라는 조건을 함께 말해야 합니다. 행별 합을 보존하거나 모든 칸을 비음수로 만드는 제약은 여기에 포함되지 않습니다.

min⁡rank⁡(B)≤k∥A−B∥F2=∑i>kσi2,min⁡rank⁡(B)≤k∥A−B∥2=σk+1\min_{\operatorname{rank}(B)\le k}\|A-B\|_F^2=\sum_{i>k}\sigma_i^2,\qquad \min_{\operatorname{rank}(B)\le k}\|A-B\|_2=\sigma_{k+1}

0≤k<q에서 2노름의 하한은 다음처럼 봅니다. 첫 k+1개 오른쪽 특이방향 안에서 B가 지우는 단위입력 x를 하나 고를 수 있습니다. 그 공간에 비해 B의 랭크가 작기 때문입니다. 그러면 ‖(A−B)x‖=‖Ax‖≥σₖ₊₁입니다. 절단 SVD가 이 하한을 달성합니다. k=q 경계의 최솟값은 0입니다.

최적 근사가 항상 유일한 것은 아닙니다. I₂의 rank-1 근사는 어느 한 단위방향으로의 직교투영을 골라도 Frobenius 오차가 1입니다. 잘린 경계의 특잇값이 같으면 다른 축 선택이 같은 기준을 달성할 수 있습니다.

Among matrices B of rank at most k, Aₖ minimizes both Frobenius and spectral-norm error. The statement requires the same shape, stated norm and rank limit; it imposes no nonnegativity or row-total constraint.

min⁡rank⁡(B)≤k∥A−B∥F2=∑i>kσi2,min⁡rank⁡(B)≤k∥A−B∥2=σk+1\min_{\operatorname{rank}(B)\le k}\|A-B\|_F^2=\sum_{i>k}\sigma_i^2,\qquad \min_{\operatorname{rank}(B)\le k}\|A-B\|_2=\sigma_{k+1}

For k<q and the spectral lower bound, a rank-at-most-k map B has a unit null direction in the first k+1 right singular directions. Then ‖(A−B)x‖=‖Ax‖≥σₖ₊₁. Truncation attains this bound. At k=q the minimum is zero.

Optimal approximations need not be unique. Any one-direction orthogonal projector approximates I₂ with rank one and Frobenius error one. Ties at the truncation boundary allow multiple equally good directions.

선택 심화Optional extension

16. 선택 증명: Frobenius 하한을 투영으로 이해하기16. Optional proof: a projection lower bound for Frobenius error

후보 B의 행공간 W에 대한 직교투영을 P라고 합시다. 그 차원 d는 k 이하이고 B=BP입니다. 행마다 W와 W⊥로 나누면 A−B=(AP−B)+A(I−P)의 두 부분이 직교합니다.

∥A−B∥F2=∥AP−B∥F2+∥A(I−P)∥F2≥∥A∥F2−∥AP∥F2\|A-B\|_F^2=\|AP-B\|_F^2+\|A(I-P)\|_F^2\ge\|A\|_F^2-\|AP\|_F^2

남길 수 있는 제곱량은 ‖AP‖²=Σσᵢ²tᵢ이며 tᵢ=‖Pvᵢ‖²입니다. 완전한 V기저에서 0≤tᵢ≤1, Σtᵢ=d≤k입니다. 마지막 합은 직교투영 P의 Frobenius 제곱노름이 차원 d라는 사실로 확인할 수 있습니다.

큰 순서의 σᵢ²에 0~1 가중치를 총 k만큼 배분하면 최대로 남기는 양은 첫 k개의 합입니다. 따라서 ‖AP‖²는 첫 k개 특잇값 제곱합 이하이고, 위 하한은 버린 제곱합이 됩니다. P를 첫 k개 오른쪽 방향의 투영으로 고르고 B=AP=Aₖ로 두면 등호입니다. 0 특잇값 방향도 넣어 완전한 n개 V기저로 합을 해석합니다.

Let P project onto the row space of candidate B, of dimension d≤k. Since B=BP, rowwise orthogonality splits A−B into AP−B and A(I−P).

∥A−B∥F2=∥AP−B∥F2+∥A(I−P)∥F2≥∥A∥F2−∥AP∥F2\|A-B\|_F^2=\|AP-B\|_F^2+\|A(I-P)\|_F^2\ge\|A\|_F^2-\|AP\|_F^2

The retained amount is ‖AP‖²=Σσᵢ²tᵢ with tᵢ=‖Pvᵢ‖². Over a full V basis, 0≤tᵢ≤1 and Σtᵢ=d≤k; the sum equals the squared Frobenius norm of a dimension-d orthogonal projector.

Allocate at most k units of such weights to decreasing squared singular values: the largest possible sum keeps the first k. The lower bound is therefore the discarded squared sum. Choosing the leading-direction projector and B=AP=Aₖ attains equality. Include zero-value directions when completing the full n-vector basis.

기초Foundations

17. 남긴 제곱량의 비율은 정확도 퍼센트가 아니다17. Retained squared size is not a percentage of accuracy

‖A‖F²>0일 때 ηₖ=(Σᵢ≤ₖσᵢ²)/(Σᵢσᵢ²)로 남긴 제곱량 비율을 계산합니다. 순서대로 항을 더하면 이 값은 줄지 않습니다. 그러나 이 수치만으로 실제 정보의 의미나 예측 정확도를 백분율로 말할 수는 없습니다.

ηk=∑i≤kσi2∑iσi2,∥A−Ak∥F2∥A∥F2=1−ηk(∥A∥F>0)\eta_k=\frac{\sum_{i\le k}\sigma_i^2}{\sum_i\sigma_i^2},\qquad \frac{\|A-A_k\|_F^2}{\|A\|_F^2}=1-\eta_k\quad(\|A\|_F>0)

diag(3,1)의 rank-1은 9/10=90%를 남기며 상대 Frobenius 오차는 √0.1입니다. 오차의 제곱비 10%와 노름비 약 31.6%는 다릅니다. 비율에 제곱이 있는지 반드시 확인하세요.

영행렬은 전체 제곱량 0이라 0/0 비율이 미정의입니다. 근사오차 자체가 0이라는 사실과 ‘100% 보존’이라는 임의 비율 표시는 구별합니다. 차수를 선택할 때에는 이 곡선과 함께 목적·단위·외부 검증을 검토합니다.

For nonzero A, retained squared size is the ratio of kept squared singular values to their total. It increases with k, but is not a percentage of predictive accuracy or meaningful information.

ηk=∑i≤kσi2∑iσi2,∥A−Ak∥F2∥A∥F2=1−ηk(∥A∥F>0)\eta_k=\frac{\sum_{i\le k}\sigma_i^2}{\sum_i\sigma_i^2},\qquad \frac{\|A-A_k\|_F^2}{\|A\|_F^2}=1-\eta_k\quad(\|A\|_F>0)

For diag(3,1), rank one retains 90%, while relative Frobenius error is √0.1. Squared-error ratios differ from norm ratios.

The zero matrix gives an undefined 0/0 ratio even though absolute error is zero. Choose rank using substantive purpose, units and validation as well as this curve.

기초Foundations

18. 의사역행렬: 0이 아닌 배율만 되돌리기18. Pseudoinverses invert only nonzero multipliers

가역행렬은 모든 방향의 배율을 되돌릴 수 있습니다. 직사각형·특이행렬은 지운 방향을 되살릴 수 없지만, 양수 특잇값 방향만 역수로 바꾸는 Moore–Penrose 의사역행렬 A⁺를 정의할 수 있습니다.

A+=VrΣr−1UrT=∑i=1r1σiviuiT,A+:n×mA^+=V_r\Sigma_r^{-1}U_r^\mathsf T=\sum_{i=1}^{r}\frac1{\sigma_i}\mathbf v_i\mathbf u_i^\mathsf T,\qquad A^+:n\times m

diag(3,0)의 의사역행렬은 diag(1/3,0)입니다. 0의 역수를 만들지 않습니다. 영행렬의 의사역행렬도 반대 크기의 영행렬입니다. 입력과 출력의 역할을 되돌리므로 크기가 n×m으로 바뀝니다.

AA⁺=UᵣUᵣᵀ는 출력 열공간의 투영, A⁺A=VᵣVᵣᵀ는 입력 행공간의 투영입니다. 일반적으로 둘 다 전체 항등은 아닙니다. 의사역행렬을 ‘사라진 정보를 완전히 복원하는 역함수’라고 부르지 않습니다.

An inverse undoes every direction of an invertible map. A pseudoinverse cannot recover erased information, but reverses positive singular multipliers and keeps zero directions zero.

A+=VrΣr−1UrT=∑i=1r1σiviuiT,A+:n×mA^+=V_r\Sigma_r^{-1}U_r^\mathsf T=\sum_{i=1}^{r}\frac1{\sigma_i}\mathbf v_i\mathbf u_i^\mathsf T,\qquad A^+:n\times m

For diag(3,0), the pseudoinverse is diag(1/3,0). Never invert zero. The zero matrix has a zero pseudoinverse of reversed shape.

AA⁺ projects onto the output column space; A⁺A projects onto the input row space. These need not be full identities. A pseudoinverse does not restore lost information.

기초Foundations

19. 가장 작은 노름의 최소제곱해19. The minimum-norm least-squares solution

x₀=A⁺b이면 Ax₀=UᵣUᵣᵀb는 b의 열공간 투영입니다. 따라서 최소제곱 적합을 줍니다. 다른 최소제곱해는 x₀+z, z∈Null(A)로 쓸 수 있습니다.

x0=A+b,∥x0+z∥2=∥x0∥2+∥z∥2(z∈Null⁡(A))\mathbf x_0=A^+\mathbf b,\qquad \|\mathbf x_0+\mathbf z\|^2=\|\mathbf x_0\|^2+\|\mathbf z\|^2\quad(\mathbf z\in\operatorname{Null}(A))

x₀는 Vᵣ의 조합이라 영공간과 직교합니다. 위 피타고라스로 z=0에서 유일하게 가장 작은 계수노름을 얻습니다. 적합이 유일하다는 말, 계수가 여러 개라는 말, 그중 최소노름 대표가 유일하다는 말을 구별하세요.

A=[1,1], b=2이면 x₁+x₂=2의 모든 해 중 (1,1)이 최소노름입니다. 두 계수가 실제로 같다는 사실을 관측으로 알아낸 것이 아니라 선택한 유클리드 최소노름 규칙입니다. 계수 단위를 바꾸면 이 규칙의 실질적 의미도 점검해야 합니다.

x₀=A⁺b gives the projected output AA⁺b and hence a least-squares fit. Every other minimizing coefficient vector is x₀+z for a null vector z.

x0=A+b,∥x0+z∥2=∥x0∥2+∥z∥2(z∈Null⁡(A))\mathbf x_0=A^+\mathbf b,\qquad \|\mathbf x_0+\mathbf z\|^2=\|\mathbf x_0\|^2+\|\mathbf z\|^2\quad(\mathbf z\in\operatorname{Null}(A))

The row-space vector x₀ is orthogonal to the null space, proving its unique minimum norm among minimizing coefficients. Separate unique fit, nonunique coefficients and a unique chosen representative.

For [1,1]x=2, the minimum-norm choice is (1,1). Equality of components is a geometric selection rule, not separately observed truth.

기초Foundations

20. 작은 양수 σ를 버리면 다른 역문제를 푼다20. Discarding a positive singular value changes the inverse problem

σ가 아주 작으면 역수 1/σ가 커져 관측의 작은 교란을 크게 늘릴 수 있습니다. τ 이하의 양수도 버리는 절단 SVD를 사용할 수 있지만, 이는 원래 A의 정확한 의사역행렬과 다릅니다.

Aτ=∑σi>τσiuiviT,Aτ+=∑σi>τ1σiviuiTA_\tau=\sum_{\sigma_i>\tau}\sigma_i\mathbf u_i\mathbf v_i^\mathsf T,\qquad A_\tau^+=\sum_{\sigma_i>\tau}\frac1{\sigma_i}\mathbf v_i\mathbf u_i^\mathsf T

diag(1,0.001)의 정확한 의사역행렬은 diag(1,1000)입니다. τ=0.01이면 절단된 행렬의 의사역행렬은 diag(1,0)이 됩니다. 덜 민감한 대신 원래 작은 방향의 신호도 버립니다.

실습에서 임계값을 바꿨다면 원래 행렬·정확한 양수 특잇값·남긴 방향·변경된 목적을 표시합니다. 편향과 안정성의 선택은 이후 정규화로 이어집니다. 수치상 편리하다는 이유로 원래 해와 같은 답이라고 말하지 않습니다.

A tiny positive σ has a large reciprocal and may amplify small perturbations. Thresholding positive values is truncated SVD, not the original matrix's exact pseudoinverse.

Aτ=∑σi>τσiuiviT,Aτ+=∑σi>τ1σiviuiTA_\tau=\sum_{\sigma_i>\tau}\sigma_i\mathbf u_i\mathbf v_i^\mathsf T,\qquad A_\tau^+=\sum_{\sigma_i>\tau}\frac1{\sigma_i}\mathbf v_i\mathbf u_i^\mathsf T

diag(1,0.001) has exact pseudoinverse diag(1,1000). Threshold 0.01 instead gives diag(1,0), trading lost directional signal for reduced sensitivity.

Display the original values, retained directions and changed problem when using a threshold. Stability and bias involve a substantive regularization choice.

기초Foundations

21. 작은 교란이 커지는 대각 역문제21. A diagonal inverse problem amplifies a small perturbation

A=diag(1,s), s>0에서 b=(1,s)의 정확한 해는 (1,1)입니다. 우변 둘째 성분에 δ를 더하면 해는 (1,1+δ/s)입니다. 14장의 거의 겹친 식과 같은 작은 배율의 민감도를 더 단순한 축에서 봅니다.

A=diag⁡(1,s),b=(1s+δ),x=(11+δ/s)(s>0)A=\operatorname{diag}(1,s),\quad\mathbf b=\begin{pmatrix}1\\s+\delta\end{pmatrix},\quad\mathbf x=\begin{pmatrix}1\\1+\delta/s\end{pmatrix}\quad(s>0)

s=0.001, δ=0.0001이면 둘째 해가 1.1입니다. δ가 작은 숫자라는 말만으로 해의 오차도 작다고 결론내릴 수 없습니다. 단위와 원래 해의 크기, 작은 배율을 함께 봅니다.

s=0이면 원래 역문제는 특이합니다. 둘째 우변이 0이면 해가 여러 개이고, 0이 아니면 정확한 해가 없습니다. 의사역행렬이 주는 최소제곱 대표와 가역계의 정확한 나눗셈을 섞지 않습니다.

For A=diag(1,s), s>0, changing b=(1,s) to (1,s+δ) changes the solution from (1,1) to (1,1+δ/s).

A=diag⁡(1,s),b=(1s+δ),x=(11+δ/s)(s>0)A=\operatorname{diag}(1,s),\quad\mathbf b=\begin{pmatrix}1\\s+\delta\end{pmatrix},\quad\mathbf x=\begin{pmatrix}1\\1+\delta/s\end{pmatrix}\quad(s>0)

With s=0.001 and δ=0.0001, the second coefficient becomes 1.1. A small numeric perturbation alone does not guarantee a small solution change.

At s=0 the exact inverse problem is singular: a zero second output permits multiple solutions, while a nonzero one is inconsistent. Separate the pseudoinverse representative from invertible-system division.

기초Foundations

22. 조건수와 제곱 Gram의 대가22. Conditioning and the cost of squaring a Gram matrix

가역 정방행렬의 2노름 조건수는 κ₂(A)=σ₁/σₙ입니다. 모든 배율이 같은 cI는 c가 아주 작아도 조건수 1입니다. 절대 배율과 상대적인 방향 불균형을 구별합니다. 전체열랭크인 직사각형 A에도 κ₂(A)=‖A‖₂‖A⁺‖₂=σmax/σmin으로 확장하며, 아래 Gram 조건수 식은 이 경우를 포함합니다.

κ2(A)=σmax⁡σmin⁡,κ2(ATA)=κ2(A)2for full column rank A\kappa_2(A)=\frac{\sigma_{\max}}{\sigma_{\min}},\qquad\kappa_2(A^\mathsf TA)=\kappa_2(A)^2\quad\text{for full column rank }A

diag(1,0.001)의 조건수는 1000이고 AᵀA에서는 10⁶입니다. 스펙트럼을 제곱하면서 작은 방향이 상대적으로 더 작아집니다. 이것이 최소제곱을 항상 정규방정식의 역행렬로 풀지 않는 중요한 이유입니다.

위의 비율은 최소 특잇값이 양수인 조건에서 씁니다. 특이행렬에는 가역계 조건이 실패했다고 표시합니다. 특히 0행렬의 0/0을 유한 숫자나 정확한 0으로 채우지 않습니다. 실습의 특정 δ/s 증폭과 모든 교란을 요약하는 조건수도 서로 다른 양입니다.

For an invertible square matrix, κ₂(A)=σ₁/σₙ. A tiny common scale cI still has condition number one: relative directional imbalance differs from absolute magnitude. For full-column-rank rectangular A, extend the definition as κ₂(A)=‖A‖₂‖A⁺‖₂=σmax/σmin; the Gram identity below includes this case.

κ2(A)=σmax⁡σmin⁡,κ2(ATA)=κ2(A)2for full column rank A\kappa_2(A)=\frac{\sigma_{\max}}{\sigma_{\min}},\qquad\kappa_2(A^\mathsf TA)=\kappa_2(A)^2\quad\text{for full column rank }A

diag(1,0.001) has condition number 1000; its Gram matrix has one million. This helps explain why explicitly inverted normal equations are not a universal least-squares algorithm.

The ratio requires positive minimum singular value. Mark singular inverse problems separately; do not fill the zero matrix's 0/0 with a number. A particular δ/s response is also distinct from the overall condition number.

기초Foundations

23. 코드의 Vh는 V가 아니다23. A returned Vh is not V

NumPy linalg.svd의 반환은 U,s,Vh입니다. 실수에서 Vh=Vᵀ이고 복소수에서는 켤레전치입니다. full_matrices=False이면 U는 m×q, Vh는 q×n입니다. s는 대각행렬 자체가 아니라 길이 q의 배열입니다.

A≈Uq diag⁡(s) Vh,V=VhTfor real dataA\approx U_q\,\operatorname{diag}(s)\,V_h,\qquad V=V_h^\mathsf T\quad\text{for real data}

같은 이름의 세 변수를 받았다는 이유로 UΣV라고 곱하면 잘못된 방향일 수 있습니다. R의 svd는 v를 반환하므로 u %*% diag(d) %*% t(v)처럼 모양을 확인해야 합니다. 언어마다 반환 규칙을 먼저 읽습니다.

재현에서는 행렬 크기·값 순서·직교성·복원오차·임계값을 남깁니다. 큰 희소행렬의 일부 SVD와 전체 분해는 별도 계산 문제이며, 전체형 U를 무조건 만드는 것은 큰 저장공간을 요구할 수 있습니다.

NumPy linalg.svd returns U,s,Vh. For real data Vh is Vᵀ; for complex data it is the conjugate transpose. With full_matrices=False, U is m×q and Vh is q×n; s is a vector, not a diagonal matrix.

A≈Uq diag⁡(s) Vh,V=VhTfor real dataA\approx U_q\,\operatorname{diag}(s)\,V_h,\qquad V=V_h^\mathsf T\quad\text{for real data}

R svd instead returns v, so reconstruction uses u %*% diag(d) %*% t(v). Read shape and orientation conventions instead of assuming identical variable meanings.

Record shapes, ordering, orthogonality, reconstruction errors and thresholds. Partial sparse decompositions and a full SVD are different computational tasks; forming a full U can be expensive.

기초Foundations

24. 평균을 되돌리면 원단위 근사표가 된다24. Add means back to obtain an original-unit approximation

각 열에서 평균을 빼고 척도로 나눈 Z에 SVD를 했다면 근사 Zₖ를 원단위로 되돌리는 단계가 필요합니다. 열별 척도를 s라 할 때 원단위 근사는 1μᵀ+Zₖdiag(s)입니다. 원관측은 따로 보존합니다.

X^=1μT+ZkD,D=diag⁡(s1,…,sn)\widehat X=\mathbf1\boldsymbol\mu^\mathsf T+Z_kD,\qquad D=\operatorname{diag}(s_1,\ldots,s_n)

Zₖ의 랭크가 k여도 평균을 더한 X̂의 랭크가 반드시 k인 것은 아닙니다. 평균은 별도의 rank-1 조각이 될 수 있습니다. ‘중심자료 rank-1’과 ‘원자료 전체 rank-1’을 같은 말로 쓰지 않습니다.

원단위로 복원한 음수값이 실제 음의 사용량이라는 뜻도 아닙니다. 비음수·합계보존 같은 제약이 없는 선형 근사이기 때문입니다. 값을 몰래 0으로 자르면 원래 SVD의 최적성·랭크·오차식이 그대로 유지된다고 할 수 없습니다.

If SVD uses centered, scaled Z, restore original units through 1μᵀ+Zₖdiag(s), preserving observations separately.

X^=1μT+ZkD,D=diag⁡(s1,…,sn)\widehat X=\mathbf1\boldsymbol\mu^\mathsf T+Z_kD,\qquad D=\operatorname{diag}(s_1,\ldots,s_n)

Even if Zₖ has rank k, adding means can increase the raw reconstructed matrix's rank. “Rank-one centered data” differs from “rank-one raw table.”

A negative reconstructed entry is not an observed negative usage value. Unconstrained approximation need not preserve nonnegativity or totals. Clipping entries changes the problem and need not preserve SVD rank or optimal-error formulas.

기초Foundations

25. 실제 세 자료의 rank-1 근사를 비교하기25. Compare rank-one approximations of three actual datasets

국가 자료는 16×2 표준화 중심표 Z입니다. 두 특잇값은 약 5.343364,1.857004이고 rank-1 제곱 Frobenius 오차는 약 3.448464로 무차원입니다. 남긴 제곱량 약 89.2235%를 국가의 예측 정확도라고 읽지 않습니다.

가구 자료는 1440×2 중심 Wh표 H입니다. 특잇값은 약 339.076106,251.552995 Wh이며 버린 제곱오차는 약 63278.909360 Wh²입니다. 원래 (0,0)Wh인 관측쌍을 평균까지 복원한 근사는 약 (0.583232,−0.157652)Wh가 됩니다. 756번 반복된 이 관측도 빈도를 보존합니다.

기업 자료는 2×5 비중심 매출 R입니다. 두 특잇값은 약 321543.823695,7520.157834백만 미국달러이고 rank-1 제곱오차는 약 56552773.841279 (백만 미국달러)²입니다. 두 회계연도 행을 모두 바꾸는 근사라 총매출을 정확히 보존하지 않습니다.

15장의 ‘FY2023 벡터는 고정하고 FY2024만 그 방향에 투영’한 문제와 이번 ‘두 행 전체를 함께 rank-1로 바꾸기’는 다릅니다. 이번 기준의 오차가 작다고 앞 문제를 잘못 풀었다는 뜻은 아닙니다. 같은 대상·제약·노름에서만 최적성을 비교합니다.

The country matrix is standardized centered Z of shape 16×2. Singular values are about 5.343364 and 1.857004, with dimensionless rank-one squared error 3.448464. Retained squared size about 89.2235% is not forecast accuracy.

The household matrix is 1440×2 centered Wh data. Singular values are about 339.076106 and 251.552995 Wh; squared error is 63278.909360 Wh². A recorded (0,0) pair reconstructs with means as approximately (0.583232,−0.157652) Wh. Preserve the frequency of its 756 occurrences.

The company matrix is uncentered 2×5 sales R. Singular values are about 321543.823695 and 7520.157834 million US dollars, with squared error 56552773.841279 in squared million-dollar units. Both fiscal rows change; totals are not preserved exactly.

Chapter 15 fixed FY2023 and projected only FY2024 onto its direction. Jointly approximating both rows is a different feasible set. A lower error here does not invalidate that earlier solution.

기초Foundations

26. 근사·자료정제·예측은 각각 다른 선택이다26. Approximation, data cleaning and prediction are separate choices

작은 특잇값을 버렸다고 그 방향이 잡음이라는 사실을 증명한 것은 아닙니다. 작은 변동이 드문 중요 사례를 담을 수도 있고 단위 선택 때문에 작아졌을 수도 있습니다. 원자료를 유지하고 버린 조각을 확인해야 합니다.

전체 자료로 축을 만든 뒤 같은 자료에서 계산한 복원오차는 그 표의 근사 기준입니다. 독립 시험자료의 예측평가와 다릅니다. 예측 실험에서 중심·척도·SVD축은 훈련자료로만 결정하고 새 자료에 적용해야 합니다.

시간·국가·기업의 좌표를 어떤 순서로 묶었는지, 결측을 어떻게 처리했는지, 비음수와 합계보존이 실제 목적에 필요한지 함께 기록하세요. 제약이 필요하면 다른 근사문제를 설계해야 하며, 무제약 SVD의 결과를 관측 사실로 고쳐 쓰지 않습니다.

Discarding a small singular direction does not prove it is noise. Rare important variation or unit choices can produce small values. Preserve observations and inspect discarded components.

Reconstruction error after learning axes from the entire table is an in-sample approximation measure, not independent predictive evaluation. Predictive pipelines fit centers, scales and axes on training data only.

Record coordinate order, missing-data treatment and whether nonnegativity or total preservation is substantively required. Additional constraints define another approximation problem; do not rewrite observations as unconstrained SVD output.

기초Foundations

27. 국가·가구·기업의 저차원 근사 사례27. Country, household and company low-rank cases

국가 사례 · 두 통계 열을 한 방향으로 줄이면 얼마나 달라질까?

2024년 16개국의 실제 GDP/명과 기대수명을 열별로 표준화한 Z(16×2)를 사용합니다. 표준화에는 같은 참조 집합의 평균과 분모 16인 표준편차를 썼습니다. 이제 두 열을 한 방향으로 줄여도 각 국가 좌표를 어느 정도 표현할 수 있는지 살펴봅니다. 원문 통계를 바꾸는 작업이 아니라, 관측한 행렬과 계산한 근사 행렬을 비교하는 실험입니다.

1. 정확한 분해와 정보를 줄이는 절단은 다른 단계

Z=σ1u1v1T+σ2u2v2T,Z1=σ1u1v1T=Zv1v1TZ=\sigma_1u_1v_1^{\mathsf T}+\sigma_2u_2v_2^{\mathsf T},\qquad Z_1=\sigma_1u_1v_1^{\mathsf T}=Zv_1v_1^{\mathsf T}

앞 식은 두 성분을 모두 보관해 원행렬을 복원하는 thin SVD입니다. 뒤 식은 큰 성분 하나만 남긴 rank 1 근사입니다. 여기서 v는 두 변수 방향, u는 16개 국가에 대응하는 방향입니다. 앞 장의 Σ=ZᵀZ/16 고유값 λ와 특잇값은 σ²=16λ로 연결됩니다.

원자료에서 계산한 두 특잇값과 절단 손실
항목계산값
σ₁5.343363709
σ₂1.857004111
||Z−Z₁||F² (무차원)3.448464268
보존한 제곱합 비율89.223549%

첫 방향은 (1,1)/√2이므로 각 행의 두 z값 평균을 두 좌표에 함께 놓은 것과 같습니다. 그림의 실제 점과 근사 점을 비교해 보세요. 가까워지는 대상은 각 나라의 원래 표준화 좌표이며, 한 국가의 우열을 평가하는 점수를 정한 것이 아닙니다.

먼저 생각한 뒤 풀이 보기: 두 번째 특잇값을 버렸을 때 오차는 어떻게 검산하나요?
∥Z−Z1∥F2=σ22=16(1−ρ)≈3.448464268327\|Z-Z_1\|_F^2=\sigma_2^2=16(1-\rho)\approx3.448464268327

모든 16행의 두 좌표 차이를 제곱해 더해도 같은 값입니다. 제곱합 비율 약 89.2235%를 보존했다는 말은 이 표준화 행렬의 제곱길이에 관한 말입니다. 원래 통계의 89.2235%가 정확하거나 인간 삶의 정보 대부분을 안다는 뜻이 아닙니다.

2. 원래 단위로 되돌린 값도 여전히 근사값

G^i=μG+sG(Z1)i1,L^i=μL+sL(Z1)i2\widehat G_i=\mu_G+s_G(Z_1)_{i1},\qquad\widehat L_i=\mu_L+s_L(Z_1)_{i2}
실측과 표준화 rank 1 뒤 원단위 복원: 일부 국가
국가실제 GDP/명근사 GDP/명 (새 관측 아님)실제 기대수명 (년)근사 기대수명 (년)
호주61,486.3856,823.4783.051284.0852
한국37,048.4345,907.8583.629381.6647
일본37,976.6447,289.8184.036381.9711
미국66,856.5150,126.5378.890282.6002
인도2,366.832,875.7172.235072.1222
먼저 생각한 뒤 풀이 보기: GDP와 수명을 원단위로 복원했으니 그 차이를 그냥 제곱해 더해도 같은 최적해인가요?

달러²와 년²를 더하면 선택한 척도가 달라집니다. 이 근사는 표준화된 차이의 제곱합을 최소화한 결과입니다. 원단위의 같은 목표를 쓰려면 GDP 차이를 sG로, 수명 차이를 sL로 나눈 손실이어야 합니다. 두 열을 표준화하지 않고 원 숫자에 SVD를 하면 다른 문제를 풉니다.

∑i[(Gi−G^i)2sG2+(Li−L^i)2sL2]=∥Z−Z1∥F2\sum_i\left[\frac{(G_i-\widehat G_i)^2}{s_G^2}+\frac{(L_i-\widehat L_i)^2}{s_L^2}\right]=\|Z-Z_1\|_F^2
먼저 생각한 뒤 풀이 보기: 평균을 더한 원단위 표도 반드시 rank 1인가요?

그렇지 않습니다. rank 1인 것은 표준화·중심화한 Z₁입니다. 열별 척도를 되돌리는 것과 평균 행을 더하는 단계를 구별해야 합니다. 평균 행을 더한 원단위 표는 rank가 더 커질 수 있습니다. 이 근사 값을 새 GDP·수명 관측이나 결측치의 실제 정답으로 바꾸지 않습니다.

자료: World Bank · 고정 2024년 16개국 공개 통계 · 실측·근사·오차 CSV

출생 시 기대수명 지표 · GDP는 2015년 불변 USD/명, 기대수명은 집단 지표입니다.

가구 사례 · 최적 rank 1 근사에서 음수 전력량이 나오면?

UCI 자료의 같은 하루 1,440개 주방·세탁실 계통 에너지 관측(Wh)을 모두 사용합니다. 열 평균을 뺀 H(1440×2)를 rank 1로 근사한 뒤, 해석을 위해 평균을 다시 더합니다. 원자료는 모두 그대로 보관합니다. 한 계통은 여러 기기를 포함하며, 여기서 특정 개인의 생활이나 기기별 행동을 식별하지 않습니다.

H1=σ1u1v1T=Hv1v1T,E^=1μT+H1H_1=\sigma_1u_1v_1^{\mathsf T}=Hv_1v_1^{\mathsf T},\qquad\widehat E=\mathbf1\mu^{\mathsf T}+H_1

분모 1,440인 중심 공분산의 고유값과 특잇값 관계는 σ²=1440λ입니다. 평균을 뺀 H₁의 rank는 1이지만, 평균을 더한 원단위 근사 Ê까지 rank 1이라고 부르지 않습니다. 그림은 실측 좌표와 이 계산한 원단위 근사 좌표를 분리합니다.

중심 행렬의 특잇값과 같은 단위의 손실
항목계산값
σ₁ (Wh)339.076106380
σ₂ (Wh)251.552995132
||H−H₁||F² (Wh²)63,278.909360
보존한 중심 제곱합 비율64.500212%

1. 실제 0과 근사 음수는 서로 다른 데이터

실제로 주방·세탁실 계량값이 둘 다 0인 기록은 756개입니다. 이 실제 (0,0)을 중심화→rank 1 투영→평균 복원하면 아래 값이 나옵니다. 근사값은 소프트웨어 표시 오류도 새 관측도 아닙니다.

같은 원자료에 대한 정확한 처리 단계
구분주방 (Wh)세탁실 (Wh)
실제 관측00
평균을 뺀 좌표-1.411805556-2.907638889
중심 rank 1 뒤 평균 복원 (계산값)0.583232474-0.157652462
먼저 생각한 뒤 풀이 보기: 소비 에너지가 음수가 될 수 없는데 왜 이런 근사가 나오나요?

최적화의 조건은 중심 행렬의 rank≤1과 제곱오차 최소화입니다. 평균을 복원한 모든 성분이 0 이상이어야 한다는 물리 제약은 넣지 않았습니다. 따라서 수학적 목표에는 최적이면서 계량값으로 쓰기에는 부적절할 수 있습니다. 음수 근사를 원문이 음수였던 것처럼 바꾸지 않습니다.

먼저 생각한 뒤 풀이 보기: 음수를 모두 0으로 잘라 내면 그대로 최적 rank 1일까요?

그 보장은 없습니다. 원단위에서 잘라 내는 후처리는 제약과 모형을 바꾸며, 다시 평균을 뺀 행렬의 rank 1 구조도 보존할 필요가 없습니다. 물리적 사용이 목적이라면 비음수성·합계·시간 구조 중 무엇을 제약할지 먼저 정하고 다른 최적화 문제를 풀어야 합니다. 여기서는 후처리를 원래 SVD의 정답이라고 표시하지 않습니다.

먼저 생각한 뒤 풀이 보기: 그림에 좌표가 76개인데 오차도 76개만 더하면 되나요?

같은 실측 쌍을 묶어 그린 76개 위치이며 원래 기록 수는 1,440입니다. 각 좌표의 제곱오차에 빈도를 곱해야 전체 오차가 됩니다. 빈도를 보존한 합은 63,278.909360 Wh²로 σ₂²와 같습니다. 각 위치에 한 표씩 주면 다른 행렬을 근사하게 됩니다.

∑distinct pairs jnj∥Ej−E^j∥22=∥H−H1∥F2,∑jnj=1440\sum_{\text{distinct pairs }j} n_j\|E_j-\widehat E_j\|_2^2=\|H-H_1\|_F^2,\qquad \sum_jn_j=1440

64.5002%라는 보존 비율은 평균을 뺀 두 계통 에너지 변동의 제곱합 기준입니다. 하루 에너지의 64.5002%를 관측했다는 뜻이 아닙니다. 이 근사에서는 열 평균이 유지되지만 분별 물리 가능성은 별도 조건입니다. 원문 시각·단위와 전체 관측은 CSV에 남겨 검산할 수 있습니다.

자료: Hebrail·Berard · 공개 가구 부분 계량값 (CC BY 4.0) · 실측·근사·오차 CSV

동일 좌표 빈도와 근사 CSV

기업 사례 · 작년을 고정한 투영과 두 해를 함께 줄이는 SVD

Apple의 실제 FY2023·FY2024 순매출을 두 행, 다섯 품목을 열로 둔 R(2×5)을 다시 봅니다. 이 사례는 평균을 빼지 않은 원래 매출 단위의 R을 근사합니다. 큰 매출의 절대 차이가 제곱손실에 큰 영향을 주며, 모든 품목의 상대 오차를 같은 비중으로 맞추는 목표와는 다릅니다.

R1=σ1u1v1T=u1u1TR,u1∈R2,v1∈R5R_1=\sigma_1u_1v_1^{\mathsf T}=u_1u_1^{\mathsf T}R,\quad u_1\in\mathbb R^2,\quad v_1\in\mathbb R^5

u는 두 회계연도의 좌표, v는 다섯 품목의 좌표를 가집니다. 두 행이 공통 품목 방향의 배수가 되도록 하되, FY2023과 FY2024를 모두 움직일 수 있습니다. 근사 행은 실제 공시 매출이 아니며 원자료는 그대로 남습니다.

실제 공시와 최적 rank 1 근사 (백만 명목 USD)
품목실제 FY2023근사 FY2023실제 FY2024근사 FY2024
iPhone200,583198,961.494201,183202,774.019
Mac29,35729,389.22329,98429,952.383
iPad28,30027,226.04926,69427,747.758
웨어러블·홈·액세서리39,84538,043.56737,00538,772.563
서비스85,20089,867.35396,16991,589.402
R의 특잇값과 전체 두 행의 손실
항목계산값
σ₁ (백만 USD)321,543.823694623
σ₂ (백만 USD)7,520.157833535
||R−R₁||F² ((백만 USD)²)56,552,773.841279
보존한 원매출 제곱합 비율99.945332%

1. 15장의 참조 모형과 목적을 비교하기

15장은 FY2023 벡터 x를 그대로 고정하고 FY2024 z만 αx로 근사했습니다. 같은 두 행 행렬로 쓰면 R고정=[xᵀ;(αx)ᵀ]입니다. 이것도 rank 1이지만 허용된 형태가 더 좁습니다. 이번에는 두 행을 모두 조정할 수 있으므로 전체 제곱오차가 더 작아질 수 있습니다.

같은 두 해에 대한 서로 다른 허용 모형
모형FY2023 행두 행 전체 제곱손실 ((백만 USD)²)
15장 고정 방향실제 x를 그대로 유지115,228,189.236445
17장 최적 rank 1두 해의 행을 함께 근사56,552,773.841279
먼저 생각한 뒤 풀이 보기: 17장의 손실이 작으니 언제나 더 좋은 경영 모형인가요?

이 두 행 행렬의 무제약 제곱손실에서는 더 좋습니다. 그러나 작년 공시를 정확히 유지해야 하는 질문이라면 15장의 제약이 의미 있습니다. 무엇을 고정하고 어떤 손실을 줄일지에 따라 질문이 달라집니다. 두 방법 모두 이미 공개된 두 해를 사용하므로 미래 예측력이 검증된 것은 아닙니다.

먼저 생각한 뒤 풀이 보기: 99.9453%라는 비율이면 각 품목을 사실상 정확히 알 수 있나요?

그 비율은 σ₁²/(σ₁²+σ₂²)로, 원 매출 숫자의 제곱합 보존율입니다. 서비스의 FY2024 실제 96,169와 근사 91,589.402에는 여전히 차이가 있습니다. 작은 품목의 상대 오차나 정책·경영 판단에 필요한 세부사항을 보장하는 “정보 정확도”로 읽지 않습니다.

먼저 생각한 뒤 풀이 보기: rank 1 근사는 회계연도 총매출도 정확히 보존하나요?

이 손실에는 연도별 합계 일치 제약이 없습니다. 실제 합계는 383,285와 391,035인데 근사 합계는 각각 약 383,487.686와 390,836.125입니다. 공시 합계를 근사값으로 덮어쓰지 않습니다. 합계를 고정하려면 추가 제약을 둔 다른 문제를 풀어야 합니다.

정확한 thin SVD 자체는 두 특잇값을 모두 남겨 R을 복원합니다. rank 1 절단은 정보를 줄이는 선택입니다. FY2023은 53주, FY2024는 52주이고 명목 매출입니다. 이 단순 근사에서 이익·기업가치·가격·판매량·환율·기간 차이를 분리하거나 인과 효과를 추론하지 않습니다.

자료: SEC EDGAR · Apple 2024 Form 10-K 품목별 순매출 · 실측·근사·오차 CSV

특잇값·손실·첫 좌우벡터 CSV · 원자료·중심화·척도·가공·해시 기록 · 근사의 최적성은 정한 행렬·단위·손실·제약 안에서의 주장입니다.

Country case · What changes when two indicator columns become one direction?

Use Z, the 16×2 standardized matrix of actual 2024 GDP/person and life expectancy. Center and scale using the same sixteen-country reference with denominator 16. Ask how well one direction represents both coordinates. This compares an observed-input matrix with a calculated approximation; it does not revise the source statistics.

1. Exact factorization and lossy truncation are separate steps

Z=σ1u1v1T+σ2u2v2T,Z1=σ1u1v1T=Zv1v1TZ=\sigma_1u_1v_1^{\mathsf T}+\sigma_2u_2v_2^{\mathsf T},\qquad Z_1=\sigma_1u_1v_1^{\mathsf T}=Zv_1v_1^{\mathsf T}

The first expression is an exact thin SVD retaining both components. The second retains only the leading component, producing a rank-one approximation. The right vectors index two variables; the left vectors index sixteen countries. Previous covariance eigenvalues satisfy σ²=16λ.

Singular values and truncation loss from actual inputs
QuantityCalculated value
σ₁5.343363709
σ₂1.857004111
||Z−Z₁||F² (dimensionless)3.448464268
Retained squared-norm fraction89.223549%

The leading direction is (1,1)/√2, so its projection assigns the mean of each row’s two z-values to both coordinates. Compare actual and approximate points. Closeness refers to standardized observations; it is not a ranking of countries’ merit.

Think first, then reveal: How is the error from discarding the second component checked?
∥Z−Z1∥F2=σ22=16(1−ρ)≈3.448464268327\|Z-Z_1\|_F^2=\sigma_2^2=16(1-\rho)\approx3.448464268327

Summing squared differences over all sixteen two-coordinate rows gives the same result. About 89.2235% retained refers to this standardized matrix’s squared norm, not a percentage of correctly known statistics or human-life information.

2. Values restored to original units remain approximations

G^i=μG+sG(Z1)i1,L^i=μL+sL(Z1)i2\widehat G_i=\mu_G+s_G(Z_1)_{i1},\qquad\widehat L_i=\mu_L+s_L(Z_1)_{i2}
Observed versus rank-one standardized approximation restored to original units
CountryObserved GDP/personApprox. GDP/person (not observed)Observed life (years)Approx. life (years)
Australia61,486.3856,823.4783.051284.0852
Korea, Rep.37,048.4345,907.8583.629381.6647
Japan37,976.6447,289.8184.036381.9711
United States66,856.5150,126.5378.890282.6002
India2,366.832,875.7172.235072.1222
Think first, then reveal: Does summing squared differences in original units give the same objective?

Adding dollars squared to years squared changes the chosen geometry. This approximation minimizes standardized squared differences. The equivalent original-unit objective divides GDP error by sG and life error by sL before squaring. Directly applying SVD to unstandardized numbers solves a different problem.

∑i[(Gi−G^i)2sG2+(Li−L^i)2sL2]=∥Z−Z1∥F2\sum_i\left[\frac{(G_i-\widehat G_i)^2}{s_G^2}+\frac{(L_i-\widehat L_i)^2}{s_L^2}\right]=\|Z-Z_1\|_F^2
Think first, then reveal: Must the table remain rank one after reference means are restored?

No. Rank one describes the standardized centered matrix Z₁. Rescaling columns and adding a mean row are different operations; adding means can increase rank. Do not treat approximate restored values as newly observed GDP/life expectancy or verified missing-data answers.

Source: World Bank · fixed public 2024 sixteen-country snapshot · Observations/approximations/errors CSV

Life-expectancy indicator · GDP uses constant 2015 USD/person; life expectancy is a population indicator.

Household case · What if the optimal rank-one approximation gives negative energy?

Use every kitchen/laundry-circuit energy observation in Wh from the same 1,440-minute UCI day. Center the columns to form H, approximate H with rank one, then add means back for interpretation. Preserve original observations. Each circuit contains multiple devices; this does not identify individuals’ habits or particular appliance actions.

H1=σ1u1v1T=Hv1v1T,E^=1μT+H1H_1=\sigma_1u_1v_1^{\mathsf T}=Hv_1v_1^{\mathsf T},\qquad\widehat E=\mathbf1\mu^{\mathsf T}+H_1

With covariance denominator 1,440, σ²=1440λ. The centered H₁ has rank one; the restored matrix Ê is not thereby rank one. Distinguish observed coordinates from calculated, restored-unit approximations in the figure.

Singular values and loss in consistent units
QuantityCalculated value
σ₁ (Wh)339.076106380
σ₂ (Wh)251.552995132
||H−H₁||F² (Wh²)63,278.909360
Retained centered squared-norm fraction64.500212%

1. Observed zero and approximate negative are different data

Both actual submeter values equal zero in 756 records. Centering this observed (0,0), applying the rank-one projection and restoring means gives the values below. Approximate negatives are neither new observations nor display glitches.

Stages applied to the same observed pair
StatusKitchen (Wh)Laundry (Wh)
Actual observation00
Centered coordinates-1.411805556-2.907638889
Rank-one centered approximation with means restored0.583232474-0.157652462
Think first, then reveal: Why does the approximation allow negative consumption?

The mathematical problem imposes rank≤1 and minimizes centered squared error; it does not require every restored entry to be nonnegative. A solution can optimize that loss while being unsuitable as a physical meter value. Never replace the original observations with the negative approximation as though it were measured.

Think first, then reveal: Does clipping every negative to zero preserve optimal rank one?

There is no such guarantee. Clipping in original units changes the model and need not preserve rank one after recentering. Physical use requires choosing nonnegativity, totals or temporal constraints and solving the corresponding problem. Postprocessing is not labeled as the original SVD optimum here.

Think first, then reveal: The chart has 76 distinct locations; may we sum just 76 errors?

No. Consolidated pairs retain all 1,440 records. Multiply each location’s squared error by its count. The resulting sum equals 63,278.909360 Wh²=σ₂². Equal weighting of distinct locations instead approximates a different matrix.

∑distinct pairs jnj∥Ej−E^j∥22=∥H−H1∥F2,∑jnj=1440\sum_{\text{distinct pairs }j} n_j\|E_j-\widehat E_j\|_2^2=\|H-H_1\|_F^2,\qquad \sum_jn_j=1440

About 64.5002% retained refers to the squared variation after centering these two energy channels, not a fraction of daily energy observed. The approximation preserves column means, while minute-level physical feasibility remains a separate constraint. CSVs preserve source timestamps, units and observations for verification.

Source: Hebrail and Berard · public household submeters (CC BY 4.0) · Observations/approximations/errors CSV

Repeated-pair counts and approximations CSV

Company case · A fixed-year reference versus jointly optimized SVD

Reuse R with actual FY2023/FY2024 Apple net sales in two rows and five categories in columns. Approximate the uncentered matrix in original sales units. Absolute differences in large categories weigh strongly in squared loss; this is not an equal-relative-error objective.

R1=σ1u1v1T=u1u1TR,u1∈R2,v1∈R5R_1=\sigma_1u_1v_1^{\mathsf T}=u_1u_1^{\mathsf T}R,\quad u_1\in\mathbb R^2,\quad v_1\in\mathbb R^5

The left vector has two year coordinates; the right vector has five category coordinates. Both year rows may change to become multiples of one common category direction. The approximations are not reported sales; preserve actual source values.

Actual filings versus optimal rank one (million nominal USD)
CategoryActual FY2023Approx. FY2023Actual FY2024Approx. FY2024
iPhone200,583198,961.494201,183202,774.019
Mac29,35729,389.22329,98429,952.383
iPad28,30027,226.04926,69427,747.758
Wearables, Home and Accessories39,84538,043.56737,00538,772.563
Services85,20089,867.35396,16991,589.402
Singular values and loss over both rows
QuantityCalculated value
σ₁ (million USD)321,543.823694623
σ₂ (million USD)7,520.157833535
||R−R₁||F² ((million USD)²)56,552,773.841279
Retained raw-sales squared-norm fraction99.945332%

1. Compare the permitted models with chapter 15

Chapter 15 fixed the actual FY2023 vector x and approximated only FY2024 z by αx. As a two-row matrix, Rfixed=[xᵀ;(αx)ᵀ] also has rank one but belongs to a narrower set. Allowing both rows to move can reduce the total squared error.

Different constraints applied to the same two years
ModelFY2023 rowBoth-row squared loss ((million USD)²)
Chapter 15 fixed directionRetain actual x unchanged115,228,189.236445
Chapter 17 optimal rank oneApproximate both year rows56,552,773.841279
Think first, then reveal: Does smaller SVD loss make it universally better for business decisions?

It is better for this unconstrained two-row squared-loss problem. But preserving the prior-year filing exactly may be a meaningful requirement. What is held fixed and what loss is minimized determine the question. Both calculations use already disclosed years; neither validates future forecasting performance.

Think first, then reveal: Does retaining 99.9453% mean every category is nearly exact?

The fraction σ₁²/(σ₁²+σ₂²) retains raw sales numbers’ squared norm. Actual FY2024 services are 96,169, still different from the approximate 91,589.402. It does not guarantee category-relative accuracy or all detail needed for policy or management. Avoid treating it as a universal information-accuracy percentage.

Think first, then reveal: Does the rank-one approximation preserve annual total sales exactly?

This loss imposes no annual-total constraints. Actual totals are 383,285 and 391,035; approximate totals are about 383,487.686 and 390,836.125. Do not overwrite reported totals with approximations. Exact totals would require additional constraints and a different problem.

The exact thin SVD retains both singular values and reconstructs R. Rank-one truncation deliberately loses detail. FY2023 has 53 weeks and FY2024 52, with nominal sales units. This approximation does not separate profits, valuation, prices, quantities, exchange rates or period lengths, nor infer causal effects.

Source: SEC EDGAR · Apple 2024 Form 10-K category net sales · Observations/approximations/errors CSV

Singular values, losses and leading factors CSV · Inputs, centering, scaling, transformations and hashes · Optimality is relative to the specified matrix, units, loss and constraints.

기초Foundations

28. 재현 과제와 공식 참고 읽기28. Reproduction tasks and official readings

m,n,q,r의 크기를 먼저 쓰고 SVD 세 단계를 설명하세요. 원소별 복원·양쪽 직교성·Avᵢ=σᵢuᵢ를 검산한 뒤, rank-k 오차를 버린 특잇값의 제곱합과 비교합니다. 의사역행렬에서는 0과 작은 양수를 구별하고 절단 규칙을 기록합니다.

실제 자료에서는 중심표와 원단위표, 관측과 근사를 각각 나란히 보존합니다. 가구의 음수 근사와 기업 합계 변화도 숨기지 않습니다. 같은 기준에서 최적이라는 정리의 조건을 결과표에서 직접 확인해 보세요.

유도와 예제는 이 총서의 경로에 맞추어 새로 구성했습니다. 다음 장은 편미분에서 전미분·기울기·야코비안·헤시안으로 이어, 앞에서 만난 제곱손실의 미분을 충분히 설명합니다.

Python · R · 실제 자료의 rank 1·잔차 비교 CSV

State m,n,q,r and explain the three stages. Check reconstruction, orthogonality and singular-pair equations. Compare rank-k errors with discarded squared singular values, and distinguish exact zero from thresholded positives in a pseudoinverse.

Keep centered and original-unit tables, observations and approximations side by side. Do not hide negative household reconstructions or changed company totals. Check optimality under its actual constraints.

The derivations follow this series' route. Next, partial and total derivatives lead to gradients, Jacobians and Hessians, explaining squared-loss differentiation in detail.

Python · R · Actual rank-one approximations and residuals CSV

Python·R 코드 실행 방법Run the Python/R companions

자료 묶음을 풀고 코드와 실제데이터 폴더를 함께 두세요. 터미널에서 코드 파일이 있는 폴더로 이동해 아래 명령을 실행합니다. 코딩이 처음이라면 손계산과 웹 실습을 먼저 하고, 데이터 사이언스 입문에서 코드를 배운 뒤 돌아와도 됩니다.Extract the bundle, keeping the scripts beside the data folder. In a terminal, enter the script folder and run the commands below. Beginners can complete hand calculations and browser labs first, returning to code after studying introductory data science.

python math17-reproduce.py
Rscript --vanilla --encoding=UTF-8 math17-reproduce.R

결과 파일은 각 코드에 지정된 결과 폴더에 저장됩니다. CSV 원자료는 덮어쓰지 않습니다.Result files are saved in the result directory specified by each script; the input CSVs are not overwritten.

영상·학자·함께 읽기Videos, thinkers and guided reading

본문의 질문을 넓히는 선택 학습입니다. 영상을 보기 전 질문을 먼저 읽고, 자신의 답을 쓴 뒤 해설과 비교하세요. 자료의 언어·선수 지식은 각 항목에 표시했습니다.Optional extensions to the chapter. Read the question first, write your answer, then compare with the explanation. Language and prerequisites are indicated below.

Eckart–Young: 가장 가까운 낮은 rank 행렬Eckart–Young: the closest rank-k matrix

MIT OpenCourseWare · Gilbert Strang · 18.065 Lecture 7

기초 설명 뒤에 볼 공식 영어 심화 영상입니다. Frobenius 손실과 특잇값 절단의 최적성이 어떤 조건의 주장인지 확인하세요. 본문에서 재생하며 강의의 일반 예시는 우리 실측 자료와 별개입니다.An official English extension after the introductory text. Check which norm and constraints underlie truncated-SVD optimality. It plays inside the chapter; lecture examples are separate from our observations.

교재 안의 YouTube 플레이어에서 재생합니다. 원영상에서 제공하는 자막은 플레이어의 CC·설정에서 선택할 수 있습니다.Playback stays in this chapter’s YouTube player. Available captions can be selected through CC/settings.

보고 읽은 뒤 답하기Respond after watching/reading 비음수성이나 실제 연도 합계를 추가해도 같은 절단식이 항상 정답일까요?Does the same truncation always remain optimal after adding nonnegativity or exact annual totals?

생각을 점검하는 해설Check your reasoning

그 보장은 없습니다. 이 장의 정리는 rank 제한과 지정한 행렬 노름의 무제약 근사에 관한 것입니다. 추가 제약은 다른 문제를 정의합니다.No guarantee follows. The result concerns rank-constrained approximation in the specified matrix norm; additional constraints define a different optimization problem.

칼 에카르트 · 물리·해양 관측과 행렬 근사Carl Eckart: physical observation and matrix approximation

UC San Diego · Marine Physical Laboratory

연구기관의 공식 소개는 에카르트의 물리·해양 연구와 Eckart–Young 정리를 함께 소개합니다. “수학적 오차가 가장 작다”와 “측정 장치의 물리 조건에 맞는다”를 구별해 보세요.The institution’s profile connects Eckart’s physics/oceanography work with the Eckart–Young theorem. Distinguish minimum mathematical loss from physically suitable measurements.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 전력 근사에 음수가 나오면 실제 계측값을 음수로 고쳐야 하나요?If an energy approximation is negative, should the original meter record be changed?

생각을 점검하는 해설Check your reasoning

원자료는 유지하고 모형의 제약이 목적에 맞는지 검토합니다. 이 예에서는 비음수성을 넣지 않은 중심 rank 1 근사가 원단위 복원 뒤 음수를 만들었습니다.Preserve observations and reconsider constraints. The example’s unconstrained centered rank-one approximation becomes negative after means are restored.

정확한 thin SVD와 좌우 특이벡터Exact thin SVD and left/right singular vectors

Driscoll and Braun · Fundamentals of Numerical Computation §7.3

§7.3.1의 고유값 연결과 §7.3.3의 thin form을 읽습니다. thin이라는 말 자체는 근사가 아니며, 특잇값을 버리는 단계와 구분합니다.Read the eigenvalue connection in §7.3.1 and thin form in §7.3.3. Thin factorization itself remains exact; discarding components is a separate step.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 2×5 기업 행렬의 두 양수 특잇값을 모두 보관하면 원공시를 복원할 수 있나요?Do both positive singular values reconstruct the 2×5 company matrix?

생각을 점검하는 해설Check your reasoning

정확한 좌우벡터와 함께 두 성분을 모두 쓰면 복원합니다. 한 성분만 남긴 rank 1 근사는 표의 차이를 남깁니다. 수치 계산에서는 반올림 허용오차도 따로 확인합니다.Yes, with the corresponding factors. One-component truncation leaves the displayed differences. Floating-point reproduction additionally requires a numerical tolerance.

NumPy 공식 문서: V가 아니라 Vh를 돌려주는 APINumPy documentation: the returned factor is Vh

NumPy · numpy.linalg.svd official reference

full_matrices=False의 반환 크기와 (U*s)@Vh 복원을 확인합니다. 실제 CSV로 만든 2차원 배열 A를 입력하고, 원형을 복원한 뒤 rank 1 절단 손실을 확인하세요.Check reduced-factor shapes and reconstruction (U*s)@Vh. Form a two-dimensional array A from the actual CSV, verify reconstruction, then inspect rank-one truncation loss.

공식 자료 읽기 ↗Read official resource ↗

보고 읽은 뒤 답하기Respond after watching/reading 실수 2×5 R의 reduced SVD에서 U, s, Vh 크기는?What are U, s and Vh shapes for reduced SVD of real 2×5 R?

생각을 점검하는 해설Check your reasoning

각각 2×2, 길이 2, 2×5입니다. Vh의 첫 행을 그대로 첫 우특이벡터의 전치로 써 R1=s[0]*outer(U[:,0],Vh[0,:])를 만듭니다. Vh를 다시 불필요하게 전치하면 크기가 어긋납니다.They are 2×2, length 2, and 2×5. Use Vh’s first row in R1=s[0]*outer(U[:,0],Vh[0,:]). Unnecessarily transposing Vh changes the required shape.

연습문제 · 계산에서 설명과 증명까지Exercises: calculation, explanation and proof

먼저 혼자 풀고 풀이를 여세요. 숫자와 함께 단위·포함 기준·계산 이유를 확인하세요.Attempt each problem before opening its solution. Check units, inclusion rules and the reason for the calculation.

1. 전체 SVD의 크기Full SVD shapes

A가 5×2일 때 전체형 U,Σ,V의 크기와 q를 적으세요.

For A of shape 5×2, state full U,Σ,V shapes and q.

풀이와 확인할 이유Solution and explanation

U는 5×5, Σ는 5×2, V는 2×2이고 q=2입니다. 곱 (5×5)(5×2)(2×2)이 원래 5×2를 만듭니다. 입력과 출력 축의 수가 다를 수 있습니다.

The shapes are 5×5, 5×2 and 2×2, with q=2. Their compatible product has shape 5×2.

2. q와 r의 차이q differs from rank

5×2 행렬의 특잇값이 4,0입니다. q,r과 rank-r형 U의 크기는?

A 5×2 matrix has singular values 4 and 0. Find q,r and compact U shape.

풀이와 확인할 이유Solution and explanation

q=2이지만 양수 값은 하나라 r=1입니다. rank-r형 U는 5×1입니다. q형 U는 5×2일 수 있으며 0방향을 포함한다는 차이가 있습니다.

q=2 and r=1. The rank-r U has shape 5×1, while a q-form U can have shape 5×2.

3. 음수 고유값과 비음수 특잇값Negative eigenvalues, nonnegative singular values

A=diag(3,−2)의 SVD를 U=diag(1,−1),V=I로 표현하세요.

Use U=diag(1,−1),V=I to factor diag(3,−2).

풀이와 확인할 이유Solution and explanation

Σ=diag(3,2)입니다. UΣVᵀ=diag(3,−2)로 복원됩니다. 음의 부호는 출력축 반사로 기록하며 특잇값은 음수가 아닙니다.

Set Σ=diag(3,2). The reflected output direction accounts for the sign while singular values stay nonnegative.

4. 직사각형 한 열의 분해Factor one rectangular column

A=(5,12)ᵀ의 양수 특잇값과 왼쪽·오른쪽 단위방향을 구하세요.

Find the positive singular value and unit directions of A=(5,12)ᵀ.

풀이와 확인할 이유Solution and explanation

열 길이는 13입니다. σ=13, u=(5/13,12/13)ᵀ, v=(1)로 A=σuvᵀ입니다. 입력은 1차원, 출력은 2차원이라 u와 v의 성분 개수(차원)가 다릅니다. 노름은 둘 다 1입니다.

Use σ=13, u=(5/13,12/13)ᵀ and v=(1). The input and output dimensions differ.

5. 제곱 고유값의 의미Squared Gram eigenvalues

A=diag(3,−2)에서 AᵀA와 그 고유값을 구하세요.

Find AᵀA and its eigenvalues for A=diag(3,−2).

풀이와 확인할 이유Solution and explanation

AᵀA=diag(9,4)로 고유값 9,4입니다. 양의 제곱근 3,2가 특잇값이며 −2라는 원래 부호는 이 Gram 행렬에서 사라집니다.

The Gram matrix is diag(9,4). Positive square roots give singular values 3 and 2, without the original negative sign.

6. 일반 고유값과의 반례A counterexample to an eigenvalue shortcut

N=[[0,1],[0,0]]의 고유값과 특잇값을 비교하세요.

Compare eigenvalues and singular values of [[0,1],[0,0]].

풀이와 확인할 이유Solution and explanation

고유값은 0,0이지만 NᵀN=diag(0,1)이므로 특잇값은 1,0입니다. 일반 비대칭행렬의 특잇값을 고유값의 절대값이라고 외우면 틀립니다.

Eigenvalues are both zero, while singular values are 1 and 0. The rule is guaranteed here for symmetric matrices, not for general nonsymmetric ones.

7. 직교 회전의 특잇값Singular values of a rotation

R=[[0,−1],[1,0]]의 특잇값을 RᵀR로 구하세요.

Find singular values of a 90-degree rotation using RᵀR.

풀이와 확인할 이유Solution and explanation

RᵀR=I₂라 특잇값은 1,1입니다. 모든 단위입력 길이를 보존합니다. 복소 고유값 ±i와 모순되지 않습니다.

RᵀR=I₂, so both are one. This is compatible with complex eigenvalues ±i.

8. 짝의 부호를 함께 바꾸기Change signs as a pair

양수 조각 σuvᵀ에서 u만 부호를 바꾸는 것과 u,v를 모두 바꾸는 것을 비교하세요.

Compare changing only u with changing both u and v in σuvᵀ.

풀이와 확인할 이유Solution and explanation

u만 바꾸면 조각이 음수가 되어 일반적으로 행렬이 바뀝니다. 둘 다 바꾸면 두 음수가 소거되어 같습니다. 재현 비교에서 왼쪽·오른쪽 짝을 함께 확인해야 합니다.

One sign change negates the component; two preserve it. Compare paired directions when checking reproductions.

9. 정확 랭크와 절단 랭크Exact rank versus threshold rank

특잇값 (1,0.001)에 τ=0.01, 규칙 σ>τ를 씁니다. 정확 랭크와 수치 랭크는?

Use singular values (1,0.001), threshold 0.01 and strict σ>τ.

풀이와 확인할 이유Solution and explanation

둘 다 원래 양수이므로 정확 랭크 2입니다. τ를 넘는 값은 하나라 수치 랭크 1입니다. 작은 값이 실제 0이라고 증명한 것이 아니라 명시한 절단 규칙입니다.

Exact rank is two; threshold rank is one. Thresholding does not prove the original small value exactly zero.

10. 임계값과 같은 값A value exactly at threshold

σ=0.01,τ=0.01에서 σ>τ 규칙은 이 방향을 남기나요?

Does strict σ>τ retain σ=τ=0.01?

풀이와 확인할 이유Solution and explanation

남기지 않습니다. 엄격한 부등식이라 같은 값은 제외됩니다. ≥를 쓰는 다른 규칙과 경계에서 달라지므로 소프트웨어와 본문의 조건을 일치시켜야 합니다.

No. Equality is excluded. A different ≥ policy changes this boundary and must be stated consistently.

11. 입력·출력의 네 공간Four spaces and their dimensions

A가 3×2, 랭크 1입니다. Col(A),Null(A),Col(Aᵀ),Null(Aᵀ)의 주변 공간과 차원을 적으세요.

For a rank-one 3×2 matrix, state ambient spaces and dimensions of its four fundamental spaces.

풀이와 확인할 이유Solution and explanation

열공간은 ℝ³ 안의 1차원, 영공간은 ℝ² 안의 1차원입니다. 행공간은 ℝ² 안의 1차원, 왼쪽 영공간은 ℝ³ 안의 2차원입니다. U의 양수 방향과 V의 양수 방향을 거꾸로 놓지 않습니다.

Column space: dimension one in ℝ³; null space: one in ℝ²; row space: one in ℝ²; left null space: two in ℝ³.

12. 두 행렬 노름Two matrix norms

A=diag(3,1)의 2노름과 Frobenius 노름·제곱노름을 구하세요.

Find the spectral and Frobenius norms of diag(3,1).

풀이와 확인할 이유Solution and explanation

2노름은 가장 큰 특잇값 3입니다. Frobenius 제곱노름은 9+1=10, 노름은 √10입니다. 최대 늘어남과 전체 제곱량은 다른 기준입니다.

The spectral norm is 3. Squared Frobenius norm is 10, so its norm is √10.

13. 외적의 모양Outer-product shape

u=(1,0)ᵀ, v=(1,2,3)ᵀ에서 uvᵀ를 구하고 랭크를 설명하세요.

Find uvᵀ for u=(1,0)ᵀ and v=(1,2,3)ᵀ.

풀이와 확인할 이유Solution and explanation

[[1,2,3],[0,0,0]]으로 2×3입니다. 모든 출력이 첫 좌표축에 있고 0행렬은 아니므로 랭크 1입니다. vᵀu라는 내적은 두 벡터 길이가 달라 정의되지 않습니다.

The result is [[1,2,3],[0,0,0]], shape 2×3 and rank one. The reversed inner product is dimension-incompatible.

14. rank-1 절단의 네 칸Entries of a rank-one truncation

A=[[2,1],[1,2]]에서 σ₁=3,q₊=(1,1)/√2입니다. A₁을 구하세요.

Use σ₁=3 and q₊=(1,1)/√2 for [[2,1],[1,2]]. Find A₁.

풀이와 확인할 이유Solution and explanation

A₁=3q₊q₊ᵀ=[[1.5,1.5],[1.5,1.5]]입니다. 잔차는 [[.5,−.5],[−.5,.5]]로 제곱합 1입니다. 버린 두 번째 특잇값 1의 제곱과 같습니다.

A₁ has every entry 1.5. The residual entries ±0.5 have squared sum one, matching the discarded singular value squared.

15. k=0과 정확 복원Rank zero and exact reconstruction

diag(3,1)에서 k=0,1,2의 제곱 Frobenius 오차를 구하세요.

Give squared Frobenius errors for k=0,1,2 on diag(3,1).

풀이와 확인할 이유Solution and explanation

각각 10,1,0입니다. k=0은 원래 크기의 0행렬, k=2는 원래 행렬입니다. 빈 합을 모양이 없는 숫자 0으로 바꾸면 후속 행렬 계산의 차원이 사라집니다.

They are 10,1,0. Rank-zero approximation is a zero matrix of the original shape, not a shape-free scalar.

16. 중복 경계의 최적근사Ties and optimal approximation

I₂의 rank-1 근사로 diag(1,0)과 diag(0,1)을 비교하세요.

Compare diag(1,0) and diag(0,1) as rank-one approximations to I₂.

풀이와 확인할 이유Solution and explanation

각 잔차의 Frobenius 노름은 1입니다. 둘 다 최적이지만 서로 다른 행렬입니다. 같은 특잇값 1,1의 경계에서 방향 선택이 유일하지 않음을 보여 줍니다.

Both have Frobenius error one and are optimal. Equal singular values permit different optimal directions.

17. 남긴 비율과 오차 비율Retained and error ratios

특잇값이 3,1일 때 rank-1의 남긴 제곱량, 상대 제곱오차, 상대 노름오차는?

For singular values 3 and 1, find rank-one retained squared size, relative squared error and relative norm error.

풀이와 확인할 이유Solution and explanation

각각 9/10,1/10,√(1/10)입니다. 마지막은 약 31.6%입니다. 90% 제곱량을 남겼다고 90% 예측정확도라는 결론은 나오지 않습니다.

They are 0.9,0.1 and √0.1. These are not predictive-accuracy percentages.

18. 영행렬의 비율The zero-matrix ratio

A=0에서 복원오차는 0입니다. η=0/0을 100%라고 자동 기록해도 될까요?

May zero error at A=0 make the retained ratio 0/0 automatically 100%?

풀이와 확인할 이유Solution and explanation

이 정의의 비율은 미정의입니다. 절대오차 0은 별도로 표시할 수 있지만, 분모가 0인 비율을 임의의 관측값으로 채우지 않습니다.

No. The defined ratio is undefined. Report absolute zero error separately.

19. 정확한 의사역행렬An exact pseudoinverse

A=diag(3,0)의 A⁺,AA⁺,A⁺A를 구하세요.

Find A⁺,AA⁺ and A⁺A for diag(3,0).

풀이와 확인할 이유Solution and explanation

A⁺=diag(1/3,0)이고 양쪽 곱은 diag(1,0)입니다. 전체 I₂가 아니라 남는 방향에 대한 투영입니다. 0을 역수로 만들지 않습니다.

The pseudoinverse is diag(1/3,0), and both products are diag(1,0), a projector rather than the full identity.

20. 의사역행렬의 최소제곱 답A pseudoinverse least-squares answer

A=diag(3,0), b=(6,1)에서 A⁺b와 적합·잔차를 구하세요.

For A=diag(3,0), b=(6,1), find A⁺b, fitted output and residual.

풀이와 확인할 이유Solution and explanation

x₀=(2,0), Ax₀=(6,0), 잔차는 (0,1)입니다. 둘째 출력 1은 열공간 밖이라 정확히 만들 수 없습니다. 최소제곱 대표는 실현 불가능한 성분을 남긴 채 적합합니다.

The answer is (2,0), fitted output (6,0), residual (0,1). The second target component lies outside the attainable column space.

21. 최소노름 대표의 뜻Meaning of a minimum-norm representative

x₁+x₂=2의 모든 해 (1+t,1−t) 중 최소노름을 구하세요.

Minimize the norm over solutions (1+t,1−t) of x₁+x₂=2.

풀이와 확인할 이유Solution and explanation

제곱노름은 (1+t)²+(1−t)²=2+2t²입니다. t=0에서 유일하게 최소여서 (1,1)입니다. 이는 선택한 계수노름 규칙이며 실제 두 구성량이 같다는 독립적인 관측증거는 아닙니다.

The squared norm is 2+2t², uniquely minimized at (1,1). This is a selection rule, not separate observational evidence of equality.

22. 작은 양수를 버린 차이Discarding a small positive value

A=diag(1,0.001)와 τ=0.01에서 원래 A⁺와 Aτ⁺를 비교하세요.

Compare A⁺ and Aτ⁺ for diag(1,0.001), τ=0.01.

풀이와 확인할 이유Solution and explanation

원래는 diag(1,1000), 절단 후는 diag(1,0)입니다. 원래 행렬은 가역이지만 절단된 것은 두 번째 방향을 지웠습니다. 두 결과를 같은 정확한 역이라고 부를 수 없습니다.

They are diag(1,1000) and diag(1,0). The latter solves a truncated problem rather than being the original exact inverse.

23. 교란의 실제 배율A perturbation amplification

A=diag(1,0.001), b=(1,0.0011)의 정확한 해를 구하세요.

Solve diag(1,0.001)x=(1,0.0011).

풀이와 확인할 이유Solution and explanation

해는 (1,1.1)입니다. 원래 b=(1,0.001)보다 둘째 우변이 0.0001 늘었지만 둘째 해는 0.1 늘었습니다. 관측교란을 작은 배율로 나누는 구조입니다.

The solution is (1,1.1). A right-side change of 0.0001 produces a coefficient change of 0.1.

24. 조건수의 제곱Squared conditioning

A=diag(1,0.001)의 κ₂(A),κ₂(AᵀA)를 구하세요.

Find κ₂(A) and κ₂(AᵀA) for diag(1,0.001).

풀이와 확인할 이유Solution and explanation

1000과 1000000입니다. 양수 최소 특잇값을 가진 전체열랭크 조건에서 Gram의 조건수가 제곱됩니다. 이론적 고유값 관계와 권장 수치알고리즘은 별도로 판단합니다.

They are 1000 and one million. Forming a Gram matrix squares the full-rank spectral condition number.

25. 작은 공통 배율A small common scale

A=10⁻⁶I₂의 조건수는 10⁶인가요?

Is the condition number of 10⁻⁶I₂ one million?

풀이와 확인할 이유Solution and explanation

두 특잇값이 모두 10⁻⁶이므로 비율은 1입니다. 역수의 절대크기와 상대 조건수를 혼동하면 안 됩니다. 모든 방향을 같은 비율로 줄인 경우입니다.

No. Both singular values equal 10⁻⁶, so their ratio is one. Absolute inverse size differs from relative conditioning.

26. NumPy 반환 모양NumPy return shapes

3×5 실수 A에 full_matrices=False를 씁니다. U,s,Vh의 크기와 복원식을 적으세요.

For real A of shape 3×5 with full_matrices=False, state returned shapes and reconstruction.

풀이와 확인할 이유Solution and explanation

q=3이므로 U는 3×3, s는 길이 3, Vh는 3×5입니다. U @ diag(s) @ Vh로 복원합니다. Vh를 다시 V라고 생각해 불필요한 전치를 하면 차원이 맞지 않을 수 있습니다.

U is 3×3, s has length three, and Vh is 3×5. Reconstruct with U @ diag(s) @ Vh.

27. 평균 복원이 랭크를 바꿀 수 있다Adding a mean can increase rank

중심 근사 Z₁의 랭크가 1이면 1μᵀ+Z₁D도 반드시 랭크 1인가요?

Must 1μᵀ+Z₁D have rank one whenever centered Z₁ does?

풀이와 확인할 이유Solution and explanation

아닙니다. 평균 항은 별도 방향을 더할 수 있습니다. 예를 들어 Z₁=[[1,0],[−1,0]], D=I, μ=(0,1)이면 복원 [[1,1],[−1,1]]의 행렬식은 2로 랭크 2입니다.

No. With Z₁=[[1,0],[−1,0]], D=I, μ=(0,1), the raw reconstruction has determinant two and rank two.

28. 실제 국가 오차의 검산Check actual country approximation error

국가 표준화 중심표의 두 번째 특잇값이 약 1.857004111입니다. rank-1 제곱오차는 어떻게 구하나요?

The second singular value is about 1.857004111. How is rank-one squared error computed?

풀이와 확인할 이유Solution and explanation

남은 값의 제곱으로 약 3.448464268입니다. 무차원 표에서 잰 Frobenius 제곱오차입니다. GDP 원단위의 달러오차와 바로 같은 수는 아니며 예측정확도도 아닙니다.

Square it to get about 3.448464268 on the dimensionless standardized matrix. This is not raw dollar error or forecast accuracy.

29. 실제 가구의 음수 근사A negative actual-household reconstruction

실측 (0,0)Wh의 선형 근사가 평균 복원 후 (0.583232,−0.157652)Wh입니다. 음수를 실측으로 고치거나 0으로 잘라 같은 SVD라고 해도 될까요?

An observed (0,0) Wh reconstructs as (0.583232,−0.157652) Wh. May observations be rewritten or clipped as the same SVD?

풀이와 확인할 이유Solution and explanation

둘 다 안 됩니다. 관측은 (0,0)으로 보존합니다. 음수는 비음수 제약이 없는 근사의 결과입니다. 잘라내면 다른 변환이 되어 원래 랭크와 최적오차 보장이 그대로 유지되지 않을 수 있습니다.

No. Keep observations unchanged. Clipping defines a different transform and need not preserve rank or optimal-error guarantees.

30. 반복된 측정쌍의 빈도Frequencies of repeated observations

한 가구 1440분 중 (0,0) 관측이 756번입니다. 중복을 지워 한 번만 두어도 같은 SVD 목적함수일까요?

May 756 occurrences of household pair (0,0) be replaced by one unweighted row?

풀이와 확인할 이유Solution and explanation

아닙니다. 각 행의 제곱오차가 빈도만큼 더해지므로 가중치가 달라집니다. 압축해서 저장한다면 각 조합의 빈도를 유지해야 원래 1440행 제곱오차를 재현합니다.

No. Repetition contributes frequency-weighted squared loss. A compressed representation must preserve counts.

31. 기업 두 행의 근사와 고정 방향 투영Joint approximation versus a fixed reference row

FY2023을 그대로 두고 FY2024만 비례 적합한 문제와 두 행을 모두 rank-1로 근사한 문제는 같은가요?

Is fixing FY2023 and fitting FY2024 proportional to it the same as a joint rank-one approximation?

풀이와 확인할 이유Solution and explanation

제약이 다릅니다. 전자는 첫 행을 고정하지만 후자는 두 행을 모두 바꿀 수 있습니다. 후자의 전체 제곱오차가 더 작아도 앞 문제의 최적답이 틀렸다는 뜻은 아닙니다. 관측공시와 근사표도 별도로 보존합니다.

No. Joint approximation can change both rows, giving a different feasible set. A lower joint loss does not invalidate the constrained earlier solution.

32. 제곱오차 단위Squared-error units

가구 특잇값은 Wh, 회사 특잇값은 백만 미국달러입니다. 제곱 Frobenius 오차 단위는?

State squared Frobenius error units for Wh household data and million-dollar sales.

풀이와 확인할 이유Solution and explanation

각각 Wh²와 (백만 미국달러)²입니다. 서로 다른 단위의 숫자 크기로 어느 자료의 근사가 현실적으로 더 좋다고 순위 매길 수 없습니다. 상대비율도 선택한 표와 척도에 의존합니다.

They are Wh² and squared millions of US dollars. Their numeric magnitudes are not directly comparable quality scores.

33. 훈련자료에서 배운 축Axes learned from the same table

전체 자료로 평균·척도·SVD축을 만든 뒤 같은 표의 복원오차가 작습니다. 독립 예측평가를 했나요?

Does small reconstruction error after learning all axes on the full table constitute independent predictive evaluation?

풀이와 확인할 이유Solution and explanation

아닙니다. 그 표의 근사 검산입니다. 예측 실험에는 별도의 목표·자료 분리·훈련자료에서만 배운 변환·시험평가지표가 필요합니다. 작은 특잇값을 버린 것만으로 잡음 제거가 입증된 것도 아닙니다.

No. It verifies an in-sample approximation. Prediction requires its own split, training-only transformations and test metric; truncation alone does not establish noise removal.

34. 추가 제약과 최적성Additional constraints change optimality

무제약 rank-k SVD가 최적이므로 합계보존·비음수 조건을 추가해도 같은 답이 항상 최적인가요?

Does unconstrained rank-k optimality automatically remain feasible and optimal under nonnegativity and total-preservation constraints?

풀이와 확인할 이유Solution and explanation

아닙니다. 원래 답이 새 제약을 어길 수도 있습니다. 실현 가능한 후보집합이 달라지므로 새 문제를 정의하고 검증해야 합니다. 정리의 조건을 제품의 실제 목적과 연결하는 단계입니다.

No. The original answer can violate those constraints. A changed feasible set defines a new problem requiring its own solution and verification.

35. 선택 심화: 어느 한 방향을 남길까Optional: which one-dimensional direction should be kept?

A=diag(3,2,1)에서 입력의 첫 축을 남긴 rank-1 근사와 W=span((1,1,0))로의 입력투영 AP를 비교하세요. 각각 남긴 제곱량과 버린 제곱오차는?

For A=diag(3,2,1), compare retaining the first input axis with projecting inputs onto span((1,1,0)). Give retained squared size and discarded error.

풀이와 확인할 이유Solution and explanation

전체 제곱량은 9+4+1=14입니다. 첫 축을 남기면 9를 남겨 오차 5입니다. W의 단위방향은 (1,1,0)/√2라 t=(1/2,1/2,0)이고 남긴 양은 9/2+4/2=6.5, 오차는 7.5입니다. 같은 한 방향이라도 큰 특이방향을 택하는 것이 Frobenius 기준에서 더 좋습니다.

Total squared size is 14. The leading axis retains 9 and discards 5. The mixed direction has weights (1/2,1/2,0), retaining 6.5 and discarding 7.5. The leading singular direction is better under this criterion.

자료와 출처Data and sources

17장 실제 SVD·저차원 근사Chapter 17 actual SVD and low-rank approximations · 관측·빈도·중심·단위·출처 기록Observations, counts, centers, units and sources

자료별 확보일·원행 식별·단위·이용 조건은 출처 기록을 확인하세요. 학습 사본은 제공처의 현재 최신 자료와 다를 수 있습니다.Consult each source record for retrieval dates, row identifiers, units and terms. Teaching copies can differ from current provider releases.

자료사전·출처·이용 조건Data dictionary, sources and terms