분류 전체보기
-
홈서버 구축기[0]2025.10.16
-
2510122025.10.12
-
[4학년][1학기][Coursera][Mathematics for ML][W9]2025.07.02
-
[4학년][1학기][Coursera][Mathematics for ML][W5]2025.04.28
홈서버 구축기[0]
지난 추석 연휴에 남는 데스크탑을 이용해서
자취방에 홈서버를 구축해보았다
여름에 데스크탑을 새로 맞추면서 실직한 친구인데
본가에 갖다둬도 쓰질 않아서 다시 데려와 재취업을 시켜보았다
홈서버 구축은 졸업하고나서 제일 먼저 하고싶었던 숙제인데
졸업하고 2달간 탱자탱자 놀기만 한 관계로 이제서야 시작한다
참고한 자료는 아래와 같다
https://youtu.be/DF_TiZrwPAA?si=c533RI-VEvzdWPuC
https://m.blog.naver.com/dhwjdrb1234/222301328940
리눅스, 윈도우10 듀얼부팅 구축하기 <파티션>
퍼가는것은 자유 복붙도 자유입니다. 저도 퍼오고 퍼왔고 복붙했으니.. 하지만 피드백에 있어서는 의견을 ...
blog.naver.com
우선 기존 OS로 부팅하고
디스크 공간을 나누어 새 OS를 설치하는 방식으로 진행되는데
처음부터 분할 가능한 디스크 공간이 실제 남는 공간보다 현저히 작은 문제가 발생했다
이벤트 로그를 확인하니
임시 캐시파일이나 가상 메모리 파일이 메모리 끝에 이동 불가능한 상태로 위치하고 있어
분할이 안된다는 내용이었다
해당 파일들을 삭제하니 가볍게 해결되었다
이후 집에 굴러다니는 USB를 이용해서 리눅스 설치까지 무난하게 완료했다
이제 노트북이나 다른 데스크톱에서 ssh 접속이 되는지 확인하고
외부 네트워크에서도 접속 가능하도록 포트포워딩하는 단계가 남았다
251012
늦은 점심 식사를 한 후,
계획에 없던 근처의 카페를 갔는데
분위기도 좋고 조명도 마음에 들었다
무엇보다 커피가 맛있다 산미도 없고!
네이버 지도
마크로스터스
map.naver.com
카페인으로도 막을 수 없었던 식곤증으로 차에서 낮잠을 잤는데
그 와중에 비도 와서 의도치 않은 세차까지
소소한 하루인 동시에 연휴의 마무리였다
[4학년][1학기][Coursera][Mathematics for ML][W10]
Mathematics for Machine Learning: Linear Algebra
Coursera - Imperial College London
Link to Course
The Gram-Schmidt Process
목적
- 주어진 선형 독립 벡터 집합 ( { \mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_n } ) 으로부터
- 직교 정규 기저 (orthonormal basis) ( { \mathbf{e}_1, \mathbf{e}_2, \dots, \mathbf{e}_n } ) 를 구성
Step 1: 첫 번째 벡터 정규화
- 첫 번째 벡터는 단순히 단위 벡터로 정규화:
$$
\mathbf{e}_1 = \frac{\mathbf{v}_1}{\lVert \mathbf{v}_1 \rVert}
$$
Step 2: 두 번째 벡터 정사영 후 직교화
- ( \mathbf{v}_2 )를 ( \mathbf{e}_1 )에 정사영 후 제거:
$$
\mathbf{u}_2 = \mathbf{v}_2 - (\mathbf{v}_2 \cdot \mathbf{e}_1) \mathbf{e}_1
$$ - 직교한 벡터를 정규화:
$$
\mathbf{e}_2 = \frac{\mathbf{u}_2}{\lVert \mathbf{u}_2 \rVert}
$$
Step 3: 세 번째 벡터 정사영 후 직교화
- ( \mathbf{v}_3 )에서 ( \mathbf{e}_1 ), ( \mathbf{e}_2 ) 성분 제거:
$$
\mathbf{u}_3 = \mathbf{v}_3 - (\mathbf{v}_3 \cdot \mathbf{e}_1) \mathbf{e}_1 - (\mathbf{v}_3 \cdot \mathbf{e}_2) \mathbf{e}_2
$$ - 정규화:
$$
\mathbf{e}_3 = \frac{\mathbf{u}_3}{\lVert \mathbf{u}_3 \rVert}
$$
일반화된 Gram-Schmidt 공식
( k )-번째 벡터에 대해:
- 기존 기저 벡터에 대한 정사영 제거:
$$
\mathbf{u}k = \mathbf{v}_k - \sum{j=1}^{k-1} (\mathbf{v}_k \cdot \mathbf{e}_j) \mathbf{e}_j
$$ - 정규화:
$$
\mathbf{e}_k = \frac{\mathbf{u}_k}{\lVert \mathbf{u}_k \rVert}
$$
- 기존 기저 벡터에 대한 정사영 제거:
요약
- 입력: 선형 독립 벡터 집합
( { \mathbf{v}_1, \dots, \mathbf{v}_n } ) - 출력: 직교 정규 벡터 집합
( { \mathbf{e}_1, \dots, \mathbf{e}_n } ) - 각 단계에서:
- 기존 벡터들에 직교한 성분만 남기고
- 단위 벡터로 정규화
- 결과: 계산이 편리한 정규 직교 기저, 변환 행렬을 간단히 역행렬 또는 전치 행렬로 다룰 수 있음
활용
- 투영 계산 시 단순화
- 역행렬 계산 시 효율적
- 선형 변환 및 회전 변환 등에서 유리
Reflecting in a Plane
목표
- 주어진 벡터 ( \mathbf{r} )을 어떤 기울어진 평면 기준으로 반사(reflection)하는 행렬 변환을 수행
주어진 벡터
- 평면 위에 있는 두 벡터:
$$
\mathbf{v}_1 = (1, 1, 1), \quad \mathbf{v}_2 = (2, 0, 1)
$$ - 평면 밖의 벡터:
$$
\mathbf{v}_3 = (3, 1, -1)
$$
1. Gram-Schmidt를 통한 직교 기저 구성
Step 1: ( \mathbf{e}_1 )
- ( \mathbf{v}_1 )을 정규화:
$$
\mathbf{e}_1 = \frac{1}{\sqrt{3}} (1, 1, 1)
$$
Step 2: ( \mathbf{e}_2 )
- ( \mathbf{v}_2 )을 ( \mathbf{e}_1 )에 정사영 후 제거:
$$
\mathbf{u}_2 = \mathbf{v}_2 - (\mathbf{v}_2 \cdot \mathbf{e}_1) \mathbf{e}_1 = (2, 0, 1) - (1,1,1) = (1, -1, 0)
$$ - 정규화:
$$
\mathbf{e}_2 = \frac{1}{\sqrt{2}} (1, -1, 0)
$$
Step 3: ( \mathbf{e}_3 )
- ( \mathbf{v}_3 )에서 ( \mathbf{e}_1 ), ( \mathbf{e}_2 ) 성분 제거:
$$
\begin{aligned}
\mathbf{u}_3 &= \mathbf{v}_3 - (\mathbf{v}_3 \cdot \mathbf{e}_1) \mathbf{e}_1 - (\mathbf{v}_3 \cdot \mathbf{e}_2) \mathbf{e}_2 \
&= (3, 1, -1) - (1,1,1) - (1, -1, 0) = (1, 1, -2)
\end{aligned}
$$ - 정규화:
$$
\mathbf{e}_3 = \frac{1}{\sqrt{6}} (1, 1, -2)
$$
2. 기저 행렬 ( E ) 정의
- 직교 정규 기저 벡터들을 열로 정리한 행렬:
$$
E = \left[ \mathbf{e}_1 \ \mathbf{e}_2 \ \mathbf{e}_3 \right] =
\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix}
$$
3. 평면에 대한 Reflection Transformation
- 평면에 수직인 ( \mathbf{e}_3 ) 방향만 부호 반전
- E-basis에서의 변환 행렬:
$$
T_E = \begin{bmatrix}
1 & 0 & 0 \
0 & 1 & 0 \
0 & 0 & -1
\end{bmatrix}
$$
4. 전체 변환
전체 변환 식:
$$
\mathbf{r}' = E \cdot T_E \cdot E^{-1} \cdot \mathbf{r}
$$( E )는 직교 행렬이므로:
$$
E^{-1} = E^\top
$$따라서:
$$
\mathbf{r}' = E \cdot T_E \cdot E^\top \cdot \mathbf{r}
$$
5. 예제
- ( \mathbf{r} = (2, 3, 5) )에 대해 계산하면:
$$
\mathbf{r}' = \frac{1}{3}(11, 14, 5)
$$
요약
- 복잡한 평면 반사 문제를 간단한 정사영 및 기저 변환으로 해결
- 핵심 전략:
- 기저 변환을 통해 평면 좌표계로 이동
- 평면에서 간단한 reflection 수행
- 다시 원래 좌표계로 복원
- 수식:
$$
\mathbf{r}' = E \cdot T_E \cdot E^\top \cdot \mathbf{r}
$$
What are Eigenvalues and Eigenvectors?
1. 개념 소개
- 'Eigen'은 독일어로 고유한(characteristic) 이라는 의미를 지님.
- Eigenproblem이란 어떤 선형 변환에서 고유한 성질을 가진 벡터와 값을 찾는 문제.
2. 직관적 이해: 선형 변환과 도형의 왜곡
- 선형 변환(linear transformation)은 scaling, rotation, shear 등을 포함.
- 전체 공간의 벡터에 변환을 적용하면, 원점을 중심으로 한 정사각형이 어떻게 변형되는지 관찰 가능:
- 수직 방향으로 2배 scaling ⇒ 직사각형으로 왜곡
- 수평 shear ⇒ 사다리꼴로 왜곡
3. 고유벡터(Eigenvectors)
- 어떤 선형 변환을 적용한 후에도 방향이 변하지 않는 벡터들을 고유벡터라고 함.
- 예: 수직 방향 scaling 시,
- 수직 벡터: 방향 유지 + 길이 2배 증가 → eigenvector, eigenvalue = 2
- 수평 벡터: 방향 및 길이 유지 → eigenvector, eigenvalue = 1
- 대각선 벡터: 방향과 길이 모두 변경 → eigenvector 아님
핵심 정의
- 고유벡터 ( \mathbf{v} )와 고유값 ( \lambda )는 다음을 만족:
$$
A \mathbf{v} = \lambda \mathbf{v}
$$
4. 예시들
1) 수직 스케일링
- ( \mathbf{v}_x = (1, 0) ), ( \mathbf{v}_y = (0, 1) )
- 변환: 수직으로 2배 scaling
- ( \mathbf{v}_x ): 방향 및 크기 불변 ⇒ 고유값 = 1
- ( \mathbf{v}_y ): 방향 유지, 크기 2배 ⇒ 고유값 = 2
2) 순수 Shear (면적 보존)
- 수평 벡터만 방향 유지 ⇒ 고유벡터는 수평 방향 하나뿐
3) Rotation
- 회전은 모든 벡터의 방향을 바꾸므로 고유벡터가 존재하지 않음
5. 고차원 일반화
- 3차원 이상에서도 개념 동일:
- 변환 후에도 방향을 유지하는 벡터를 찾음
- 이들의 길이 변화 비율이 고유값
6. 요약
- 고유벡터는 선형 변환 후에도 방향이 유지되는 벡터
- 고유값은 해당 고유벡터의 스케일 변화 비율
- 시각적으로 이해하면 개념이 명확해지며, 수학적 표현은 단순한 벡터-스칼라 곱
- 예외적으로 회전 변환에는 고유벡터가 존재하지 않음
- 이 개념은 PCA 등 고차원 분석에서 매우 중요함
A \mathbf{v} = \lambda \mathbf{v}
- 여기서,
( A ): 선형 변환 행렬
( \mathbf{v} ): 고유벡터
( \lambda ): 고유값
Special Eigen-Cases
개요
이 장에서는 선형 변환에서 특별한 경우의 고유벡터(eigenvector) 와 고윳값(eigenvalue) 들이 어떤 모습을 보이는지를 시각적으로 이해합니다. 고유벡터란, 변환 전후에도 같은 span(방향)에 남는 벡터이며, 고윳값은 해당 벡터가 얼마나 늘어났거나 줄어들었는지를 나타냅니다.
1. Uniform Scaling (균일한 스케일링)
- 모든 방향으로 같은 비율로 스케일링하는 경우
- 모든 벡터가 고유벡터가 됨
- 고윳값은 스케일링 비율
2. 180° Rotation (180도 회전)
- 일반적인 회전(예: 90도)은 고유벡터가 없음
- 그러나 180도 회전은 모든 벡터가 고유벡터가 됨
- 방향이 반대가 되므로 고윳값은 -1
3. Horizontal Shear + Vertical Scaling
- 수평 shear와 수직 scaling이 조합된 경우
- 육안으로 고유벡터를 찾기 어렵지만 존재함
- 일부 벡터(예: 수평 벡터)는 변환 전후 동일 방향을 유지
- 이런 벡터는 고유벡터이고, 대응하는 고윳값은 1
시각적으로는 변형된 평행사변형(parallelogram)에서 변형 전후 방향이 바뀌지 않는 벡터를 찾는 것으로 이해
4. 3D Rotation (3차원 회전)
- 3D 회전에서도 2D와 동일하게 대부분의 벡터는 방향이 바뀜
- 그러나 회전의 축 방향 벡터는 회전 전후 위치가 변하지 않음
- 따라서 그 축이 고유벡터이며, 고윳값은 1
요약
- 고유벡터는 변환 전후 동일한 방향을 유지하는 벡터
- 고윳값은 그 벡터가 얼마나 스케일링되는지를 나타냄
- 특별한 변환에서는 전 벡터가 고유벡터가 되기도 하며
- 3D 회전의 고유벡터는 회전축과 일치
- 머신러닝에서는 수백 차원의 공간에서 이러한 고유문제를 다루게 되며, 수학적으로 더 일반적인 정의가 필요함
Calculating Eigenvectors
1. 고유문제의 수식화
선형변환 행렬 $$ A $$에 대해, 고유벡터 $$ \mathbf{x} $$와 고윳값 $$ \lambda $$는 다음 조건을 만족한다:
$$
A\mathbf{x} = \lambda \mathbf{x}
$$
- 이 식은 변환 $$ A $$가 어떤 벡터 $$ \mathbf{x} $$를 방향은 유지한 채로 크기만 $$ \lambda $$배 만큼 스케일링한다는 의미.
- 모든 성분이 0인 벡터(즉, $$ \mathbf{x} = \mathbf{0} $$)는 의미 없는 trivial 해이므로 제외함.
위 식을 정리하면,
$$
(A - \lambda I)\mathbf{x} = \mathbf{0}
$$
- 여기서 $$ I $$는 항등 행렬(identity matrix)이며, $$ \lambda $$는 스칼라(수), $$ A $$는 정사각 행렬이다.
이제 고유값을 구하는 핵심 조건은 다음과 같다:
$$
\det(A - \lambda I) = 0
$$
이 식을 특성 방정식(characteristic equation)이라고 하며, 여기서 나온 $$ \lambda $$가 고유값이 된다.
2. 예제: 수직 스케일링 변환
변환 행렬:
$$
A = \begin{bmatrix}
1 & 0 \
0 & 2
\end{bmatrix}
$$
특성 방정식:
$$
\det\left(
\begin{bmatrix}
1 - \lambda & 0 \
0 & 2 - \lambda
\end{bmatrix}
\right) = (1 - \lambda)(2 - \lambda) = 0
$$
⇒ 고유값: $$ \lambda_1 = 1, \quad \lambda_2 = 2 $$
고유벡터:
$$ \lambda = 1 $$
인 경우:$$ (A - I)\mathbf{x} = 0 \Rightarrow \begin{bmatrix} 0 & 0 \ 0 & 1 \end{bmatrix} \begin{bmatrix} x_1 \ x_2 \end{bmatrix} = \mathbf{0} $$
⇒
$$ x_2 = 0, x_1 은 자유롭게 선택 가능 $$⇒ $$ \mathbf{x} = \begin{bmatrix} t \ 0 \end{bmatrix} $$ (수평 방향의 모든 벡터)
$$ \lambda = 2 $$
인 경우:
$$ (A - 2I)\mathbf{x} = 0 \Rightarrow \begin{bmatrix} -1 & 0 \ 0 & 0 \end{bmatrix} \begin{bmatrix} x_1 \ x_2 \end{bmatrix} = \mathbf{0}
$$
⇒ $$ x_1 = 0, x_2 $$은 자유롭게 선택 가능
⇒ $$ \mathbf{x} = \begin{bmatrix} 0 \ t \end{bmatrix} $$ (수직 방향의 모든 벡터)
3. 예제: 90도 회전
변환 행렬:
$$
A = \begin{bmatrix}
0 & -1 \
1 & 0
\end{bmatrix}
$$
특성 방정식:
$$
\det\left( \begin{bmatrix}
-\lambda & -1 \
1 & -\lambda
\end{bmatrix} \right) = \lambda^2 + 1 = 0
$$
- 실수 범위에서는 해가 없음
- ⇒ 실수 고유벡터가 존재하지 않음
(복소수 고유벡터는 존재하지만 여기서는 다루지 않음)
4. 고유값 계산의 현실적 의미
- 차원이 커질수록 (예: 100차원) 특성 다항식의 해를 구하는 것은 대수적으로 불가능해짐
- 실제로는 대부분 수치적 반복 알고리즘(예: 파워 iteration, QR decomposition 등)을 사용함
- 따라서 핵심은 계산보다 직관과 해석임
요약
고유벡터는 변환 전후에 방향이 변하지 않는 벡터
고윳값은 해당 벡터가 얼마나 스케일링되는지를 나타냄
일반적으로 다음 조건을 만족시켜 계산함:
$$
\det(A - \lambda I) = 0
$$고유값을 구한 후, 다음을 만족하는 벡터 $$ \mathbf{x} $$를 구함:
$$
(A - \lambda I)\mathbf{x} = \mathbf{0}
$$복잡한 계산은 컴퓨터에게 맡기고, 해석과 개념에 집중하는 것이 더 중요함
다음은 고유벡터를 기저(basis)로 사용하면 어떤 일이 일어나는지 살펴본다.
Changing to the Eigenbasis
선형 변환을 여러 번 반복 적용해야 하는 경우, 계산 효율성을 높이기 위해 고유기저(eigenbasis)를 이용한 대각화(diagonalisation) 기법을 사용할 수 있다. 이 챕터에서는 고유값과 고유벡터 개념을 활용하여 변환 행렬을 효율적으로 거듭제곱하는 방법을 설명한다.
행렬 거듭제곱의 문제점
변환 행렬을 반복하여 곱해야 하는 경우가 종종 있다. 예를 들어, 변환 행렬을 T라 할 때, 이 변환이 한 번 적용될 때마다 입자의 위치가 변한다고 하자. 초기 벡터 v₀에서 출발한 입자의 위치는 다음과 같이 나타난다.
$$
v_1 = T v_0,\quad v_2 = T^2 v_0,\quad \dots,\quad v_n = T^n v_0
$$
이때 n이 매우 크다면, 일반적인 행렬의 거듭제곱 계산은 계산량이 상당히 크고 비효율적이다.
대각행렬의 효율성
만약 행렬이 대각행렬이라면, 거듭제곱 계산은 훨씬 간단해진다. 예를 들어 대각행렬 D를 n제곱할 때는 각 대각 성분만 n제곱하면 된다.
$$
D^n =
\begin{bmatrix}
a^n & 0 & 0 \
0 & b^n & 0 \
0 & 0 & c^n
\end{bmatrix}
$$
고유기저로의 변환과 대각화
모든 행렬이 대각행렬 형태는 아니지만, 특정한 고유기저로 좌표계를 바꾸면 변환 행렬을 대각행렬 형태로 나타낼 수 있다. 이 기저를 바로 고유기저(eigenbasis) 라고 한다. 고유벡터들을 열로 하는 변환 행렬 C를 구성하면, 원래의 변환 행렬 T는 다음과 같이 표현될 수 있다.
$$
T = C D C^{-1}
$$
여기서 D는 고유값들로 이루어진 대각행렬이다.
$$
D =
\begin{bmatrix}
\lambda_1 & 0 & 0 \
0 & \lambda_2 & 0 \
0 & 0 & \lambda_3
\end{bmatrix}
$$
이러한 대각화를 통해 행렬의 거듭제곱을 효율적으로 계산할 수 있다.
행렬 거듭제곱의 일반적인 공식
대각화를 이용하면 행렬 T의 n제곱은 다음과 같이 간단히 표현할 수 있다.
$$
T^n = C D^n C^{-1}
$$
즉, 고유기저로 변환하여 거듭제곱을 계산한 뒤 다시 원래 기저로 돌아오는 과정을 통해 계산 효율성을 크게 높일 수 있다.
요약 및 의미
고유기저로의 변환은 복잡한 행렬 계산을 간단하게 만들어주는 중요한 기법이다. 고유벡터와 고유값을 통해 행렬을 대각화하여 계산량을 절감할 수 있으며, 이는 특히 머신러닝이나 데이터 분석에서 큰 차원의 행렬을 다룰 때 매우 유용하다.
Introduction to PageRank
PageRank 개요
PageRank는 1998년 구글의 창업자 Larry Page가 발표한 알고리즘으로, 웹사이트의 중요도를 평가하여 검색 결과의 순서를 결정하는 데 사용되었다. 이 알고리즘은 웹페이지 간의 링크 구조에 따라 각 페이지의 상대적 중요도를 결정하며, 이를 선형대수의 고유벡터(eigenvector) 개념과 연결하여 해석할 수 있다.
웹페이지 링크 구조 표현하기
PageRank 알고리즘의 핵심 아이디어는 임의의 인터넷 사용자가 웹페이지 링크를 무작위로 클릭할 때, 각 페이지에서 머무를 확률을 계산하는 것이다. 예를 들어 4개의 웹페이지 A, B, C, D가 있는 경우, 각 페이지에서 다른 페이지로의 링크를 확률 벡터로 나타낼 수 있다.
예를 들어, 페이지 A에서 다른 페이지로의 링크 확률 벡터는 다음과 같다.
$$
L_A = \left(0,\ \frac{1}{3},\ \frac{1}{3},\ \frac{1}{3}\right)
$$
이 벡터는 페이지 A가 자신을 제외한 B, C, D로 링크가 있고, 각 링크의 클릭 확률이 동일하도록 정규화된 것을 나타낸다.
다른 페이지들 역시 같은 방식으로 벡터를 구성한다.
링크 행렬 구축하기
링크 벡터들을 열(column)로 삼아 행렬 L을 구성할 수 있다. 예를 들어, 4개의 페이지가 있는 경우 다음과 같이 4×4 링크 행렬을 구성한다.
$$
L = \begin{bmatrix}
0 & 0 & 0 & 0 \
\frac{1}{3} & 0 & \frac{1}{2} & \frac{1}{2} \
\frac{1}{3} & \frac{1}{2} & 0 & \frac{1}{2} \
\frac{1}{3} & \frac{1}{2} & \frac{1}{2} & 0
\end{bmatrix}
$$
이 행렬에서 각 열은 특정 페이지에서의 외부 링크 확률을 나타내며, 각 행은 특정 페이지로 들어오는 내부 링크를 나타낸다.
PageRank 방정식
페이지의 중요도를 나타내는 랭크(rank) 벡터 r는 다음과 같이 표현할 수 있다.
$$
r = L r
$$
즉, 랭크 벡터 r는 링크 행렬 L과 랭크 벡터 r을 곱한 결과와 같아질 때까지 반복 계산하여 얻을 수 있다. 이는 결국 L의 고유값(eigenvalue)이 1인 고유벡터를 찾는 문제로 환원된다.
반복법을 통한 해 구하기 (Power method)
PageRank 문제는 처음에는 모든 페이지의 랭크가 동일하다고 가정하고, 이를 반복적으로 계산하여 점차 랭크 벡터를 갱신하는 방식을 사용한다. 이 반복법을 Power method라 하며, 수학적으로는 다음과 같은 식으로 표현된다.
$$
r_{i+1} = L r_i
$$
위 과정을 반복하면 r 벡터는 최종적으로 수렴하며, 이를 통해 각 웹페이지의 상대적 중요도를 얻을 수 있다.
Damping factor의 역할
PageRank 알고리즘에는 Damping factor (감쇠 인자)라는 개념이 있다. 이는 사용자가 링크를 따라가지 않고 임의로 다른 웹페이지 주소를 입력할 확률을 반영한 것으로, 다음과 같은 수식으로 표현된다.
$$
r_{i+1} = d L r_i + \frac{1 - d}{n}
$$
여기서 ( d ) 는 0과 1 사이의 값이며, 보통 0.85가 사용된다. ( n ) 은 총 웹페이지의 개수이다. Damping factor는 계산의 안정성과 수렴 속도를 조절하는 역할을 한다.
실제 활용과 의의
실제 웹페이지는 매우 많은 페이지가 존재하며, 대부분의 페이지가 서로 링크되지 않는 희소 행렬 (sparse matrix) 형태를 띤다. 따라서 실제 PageRank 알고리즘은 이러한 희소 행렬을 다루는 데 최적화된 방법으로 효율적으로 계산한다.
결론적으로, PageRank 알고리즘은 고유벡터와 선형대수 이론을 활용하여 복잡한 웹페이지 구조 내에서 각 페이지의 상대적 중요도를 효율적으로 평가할 수 있는 강력한 도구이다.
'학사 > 아주대 융시공' 카테고리의 다른 글
[4학년][1학기][Coursera][Mathematics for ML][W9] (0) | 2025.07.02 |
---|---|
[4학년][1학기][Coursera][Mathematics for ML][W8] (1) | 2025.04.28 |
[4학년][1학기][Coursera][Mathematics for ML][W5] (0) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W7] (0) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W6] (1) | 2025.04.28 |
[4학년][1학기][Coursera][Mathematics for ML][W9]
Mathematics for Machine Learning: Linear Algebra
Coursera - Imperial College London
Link to Course
Special matrices and coding up some matrix operations : Determinants and inverses
1. 행렬이 공간에 주는 영향: Determinant의 정의
- 행렬이 공간을 얼마나 확장 또는 축소시키는지를 나타내는 값이 바로 행렬식(determinant)이다.
- 예를 들어 다음과 같은 행렬을 보자:
$$
A = \begin{bmatrix}
a & 0 \
0 & d
\end{bmatrix}
$$
- 이 행렬은 ( e_1 = \begin{bmatrix} 1 \ 0 \end{bmatrix} ), ( e_2 = \begin{bmatrix} 0 \ 1 \end{bmatrix} ) 를 각각 다음과 같이 변환한다:
$$
Ae_1 = \begin{bmatrix} a \ 0 \end{bmatrix}, \quad Ae_2 = \begin{bmatrix} 0 \ d \end{bmatrix}
$$
- 결과적으로 단위 정사각형은 면적이 ( a \times d )인 직사각형으로 변환된다.
이때의 면적 비율이 행렬식(determinant)이며:
$$
\det(A) = ad
$$
2. 일반적인 2×2 행렬의 Determinant
- 보다 일반적인 행렬 ( A ):
$$
A = \begin{bmatrix}
a & b \
c & d
\end{bmatrix}
$$
- 이 행렬이 단위 정사각형을 어떤 평행사변형으로 변환한다고 했을 때, 그 평행사변형의 면적은 다음과 같다:
$$
\det(A) = ad - bc
$$
- 이 determinant는 변환된 공간의 면적을 의미한다.
3. 2×2 행렬의 역행렬과 determinant의 관계
- 행렬 ( A )의 역행렬은 다음과 같이 주어진다:
$$
A^{-1} = \frac{1}{\det(A)} \begin{bmatrix}
d & -b \
-c & a
\end{bmatrix}
$$
- 이 공식은 고등학교에서 배운 역행렬 정의로, 여전히 수학적으로 정확하다.
- 단, 역행렬이 존재하려면 다음 조건이 반드시 만족해야 한다:
$$
\det(A) \neq 0
$$
- 이 말은 즉, 변환이 공간을 어떤 선형 독립된 형태로 유지해야 함을 의미한다.
4. 선형 독립성과 determinant = 0의 관계
- 만약 ( e_1 )과 ( e_2 )가 같은 방향을 가리키거나, 하나가 다른 하나의 배수라면 이들은 선형 독립이 아니다.
- 예: ( e_1 \rightarrow \begin{bmatrix} 1 \ 1 \end{bmatrix} ), ( e_2 \rightarrow \begin{bmatrix} 2 \ 2 \end{bmatrix} )
⇒ 변환 결과가 같은 선 위의 점들이 되며, 이 경우 평행사변형이 아닌 선분이 되어 면적 = 0, 즉:
$$
\det(A) = 0
$$
- 따라서 이 경우에는 역행렬이 존재하지 않는다.
5. 3차원에서도 마찬가지
3×3 행렬에서도 하나의 기저 벡터가 나머지 둘의 선형 결합이라면:
- 변환된 결과는 평면(면적)이나 선(길이)로 부피(volume) = 0
- 즉:
$$
\det(A) = 0 \Rightarrow A^{-1} \text{ does not exist}
$$
6. 가우스 소거법으로 본 선형 종속
예: 다음과 같은 행렬이 있다고 하자
$$
A = \begin{bmatrix}
1 & 2 & 3 \
4 & 5 & 6 \
5 & 7 & 9
\end{bmatrix}
$$
- 여기서 3번째 행은 첫 번째와 두 번째 행을 더한 것과 같음:
$$
R_3 = R_1 + R_2
$$
- 이는 선형 종속 관계를 의미하며, 결국 다음과 같은 결과를 낳음:
$$
\text{마지막 행} \Rightarrow 0 = 0
$$
- 이 경우 해가 무수히 많거나 없을 수 있으며, 유일해가 존재하지 않는다.
7. 역행렬이 존재하지 않는 이유
선형 종속이 발생한 경우:
- 변환이 공간 차원을 축소시킴 (예: 3D → 2D)
- 정보의 일부가 사라졌기 때문에 되돌릴 수 없다
⇒ 역행렬이 존재하지 않음
8. 요약
- Determinant는 행렬이 공간을 얼마나 확장 또는 축소시키는지를 나타내며, 면적 또는 부피 개념과 연결된다.
- ( \det(A) \neq 0 ): 역행렬이 존재, 해가 유일함
- ( \det(A) = 0 ): 역행렬 존재하지 않음, 해가 없거나 무한히 많음
- 선형 독립성은 determinant와 직결되며, 선형 종속이면 공간 축소 발생
✅ 핵심 공식 요약
- 2×2 행렬의 determinant:
$$
\det \begin{bmatrix} a & b \ c & d \end{bmatrix} = ad - bc
$$
- 역행렬 존재 조건:
$$
\text{If } \det(A) \neq 0, \text{ then } A^{-1} = \frac{1}{\det(A)} \begin{bmatrix}
d & -b \
-c & a
\end{bmatrix}
$$
$$det(A) = 0 \Rightarrow $$
역행렬 존재하지 않음
Matrices as objects that map one vector another; all the types of matrices
1. 아인슈타인 합 기호 (Einstein Summation Convention)
- 행렬 연산을 간결하게 표현하는 기호로, 반복 인덱스가 있으면 자동으로 덧셈을 수행한다고 가정한다.
- 일반적인 행렬 곱 ( C = AB )에서:
$$
C_{ik} = \sum_j A_{ij} B_{jk}
$$
- 아인슈타인 합 기호를 사용하면, 이를 다음과 같이 간단히 쓴다:
$$
C_{ik} = A_{ij} B_{jk}
$$
- 위 표현에서 반복되는 인덱스 ( j ) 는 자동으로 모든 ( j )에 대해 합산된다.
2. 행렬 곱 계산 예시
- 예를 들어 ( C_{23} ) (2행 3열의 원소)를 구할 때:
$$
C_{23} = A_{21} B_{13} + A_{22} B_{23} + \cdots + A_{2n} B_{n3}
$$
- 구현 관점에서는 3중 반복문으로 계산 가능:
- 외부 루프: ( i )
- 중간 루프: ( k )
- 내부 루프 (누적합): ( j )
3. 비정방 행렬 간의 곱
- ( A \in \mathbb{R}^{m \times n}, B \in \mathbb{R}^{n \times p} ) 이라면:
$$
C = AB \in \mathbb{R}^{m \times p}
$$
- ( j ) 인덱스가 일치하면 곱셈 가능:
$$
C_{ik} = \sum_j A_{ij} B_{jk}
$$
- 예시:
- ( A ): 2×3 행렬
- ( B ): 3×4 행렬
- 결과 ( C ): 2×4 행렬
4. Dot Product와 행렬 곱의 연결
- 벡터 ( \mathbf{u}, \mathbf{v} \in \mathbb{R}^n ) 에 대해 dot product:
$$
\mathbf{u} \cdot \mathbf{v} = \sum_i u_i v_i = u_i v_i
$$
- 벡터 ( \mathbf{u} )를 행 벡터로, ( \mathbf{v} )를 열 벡터로 보면:
$$
\mathbf{u}^\top \mathbf{v} = \text{dot product}
$$
⇒ dot product는 행렬 곱의 특별한 경우이다.
5. Dot Product의 기하학적 의미: 투영
( \hat{\mathbf{u}} = \begin{bmatrix} u_1 \ u_2 \end{bmatrix} ),
기준축: ( \hat{e}_1 = \begin{bmatrix} 1 \ 0 \end{bmatrix}, \hat{e}_2 = \begin{bmatrix} 0 \ 1 \end{bmatrix} )( \hat{\mathbf{u}} \cdot \hat{e}_1 ):
→ ( \hat{\mathbf{u}} )를 x축으로 투영한 성분 = ( u_1 )반대로 ( \hat{e}_1 \cdot \hat{\mathbf{u}} )도 동일한 값을 가진다.
- 이는 dot product가 교환 가능(commutative) 하다는 사실을 의미
⇒ 투영된 길이와 dot product가 서로 대응하며, dot product는 대칭적인 기하 구조를 설명함
6. 요약
- 아인슈타인 합 기호는 반복 인덱스에 대해 자동으로 합산하는 간결한 표기법이다.
- 비정방 행렬도 ( j ) 인덱스가 일치하면 곱할 수 있으며, 결과 행렬은 ( \text{행렬 A의 행 수} \times \text{행렬 B의 열 수} )
- Dot product는 행렬 곱의 특수한 형태이며, 기하적으로는 투영 의미를 갖는다.
- 행렬 연산은 수치적 작업일 뿐 아니라, 기하적 의미(공간 변환, 투영 등)를 내포한다.
Matrices transform into the new basis vector set: Matrices changing basis
1. 기준 벡터와 변환 행렬
- 기존 기준: ( \hat{e}_1 = [1, 0], \hat{e}_2 = [0, 1] )
- 곰(Panda)의 기준 벡터 (우리 기준에서):
- ( \mathbf{b}_1 = [3, 1] )
- ( \mathbf{b}_2 = [1, 1] )
⇒ 곰의 기준을 나타내는 행렬 ( B ):
$$
B = \begin{bmatrix}
3 & 1 \
1 & 1
\end{bmatrix}
$$
2. 곰의 좌표계에서의 벡터 → 나의 좌표계로 변환
곰 기준 벡터: ( \mathbf{v}_{\text{Bear}} = \begin{bmatrix} \frac{3}{2} \ \frac{1}{2} \end{bmatrix} )
내 기준에서의 벡터:
$$
\mathbf{v}{\text{Me}} = B \cdot \mathbf{v}{\text{Bear}} = \begin{bmatrix}
3 & 1 \
1 & 1
\end{bmatrix}
\begin{bmatrix}
\frac{3}{2} \
\frac{1}{2}
\end{bmatrix} = \begin{bmatrix}
5 \
2
\end{bmatrix}
$$
3. 나의 좌표계 → 곰의 좌표계
- 역변환 행렬 ( B^{-1} ):
$$
B^{-1} = \frac{1}{2}
\begin{bmatrix}
1 & -1 \
-1 & 3
\end{bmatrix}
$$
내 기준 벡터: ( \mathbf{v}_{\text{Me}} = \begin{bmatrix} 5 \ 2 \end{bmatrix} )
곰 기준 벡터로 변환:
$$
\mathbf{v}{\text{Bear}} = B^{-1} \cdot \mathbf{v}{\text{Me}} = \frac{1}{2}
\begin{bmatrix}
1 & -1 \
-1 & 3
\end{bmatrix}
\begin{bmatrix}
5 \
2
\end{bmatrix}
= \begin{bmatrix}
\frac{3}{2} \
\frac{1}{2}
\end{bmatrix}
$$
4. 직교정규(Orthonormal) 기준의 예시
- 곰의 기준 벡터:
$$
\mathbf{b}_1 = \frac{1}{\sqrt{2}} [1, 1], \quad
\mathbf{b}_2 = \frac{1}{\sqrt{2}} [-1, 1]
$$
⇒ 변환 행렬 ( B ):
$$
B = \frac{1}{\sqrt{2}} \begin{bmatrix}
1 & -1 \
1 & 1
\end{bmatrix}
$$
곰 기준 벡터: ( \mathbf{v}_{\text{Bear}} = \begin{bmatrix} 2 \ 1 \end{bmatrix} )
내 기준 벡터로:
$$
\mathbf{v}{\text{Me}} = B \cdot \mathbf{v}{\text{Bear}} = \frac{1}{\sqrt{2}} \begin{bmatrix}
1 & -1 \
1 & 1
\end{bmatrix}
\begin{bmatrix}
2 \
1
\end{bmatrix}
= \frac{1}{\sqrt{2}} \begin{bmatrix}
1 \
3
\end{bmatrix}
$$
5. 역변환 (내 기준 → 곰 기준)
( B^{-1} = \frac{1}{\sqrt{2}} \begin{bmatrix}
1 & 1 \1 & 1
\end{bmatrix} )내 기준 벡터: ( \begin{bmatrix} 1 \ 3 \end{bmatrix} )
곰 기준 벡터:
$$
B^{-1} \cdot \begin{bmatrix} 1 \ 3 \end{bmatrix} = \frac{1}{\sqrt{2}} \begin{bmatrix}
1 \cdot 1 + 1 \cdot 3 \
-1 \cdot 1 + 1 \cdot 3
\end{bmatrix} = \frac{1}{\sqrt{2}} \begin{bmatrix}
4 \
2
\end{bmatrix} = \begin{bmatrix}
2 \
1
\end{bmatrix}
$$
6. 직교 기준일 때는 투영(dot product) 으로 변환 가능
내 벡터: ( \mathbf{v} = \begin{bmatrix} 1 \ 3 \end{bmatrix} )
곰의 기준 ( \mathbf{b}_1, \mathbf{b}_2 )에 대한 투영:
$$
\mathbf{v}{\text{Bear}, 1} = \mathbf{v} \cdot \mathbf{b}_1 = \frac{1}{\sqrt{2}} (1 + 3) = 2 \
\mathbf{v}{\text{Bear}, 2} = \mathbf{v} \cdot \mathbf{b}_2 = \frac{1}{\sqrt{2}} (-1 + 3) = 1
$$
⇒ 곰 기준 벡터: ( \begin{bmatrix} 2 \ 1 \end{bmatrix} )
※ 단, 곰의 기준 벡터가 직교가 아닐 경우에는 dot product를 통한 변환은 불가능, 반드시 행렬 ( B^{-1} ) 이용해야 함
7. 요약
- 기준 변환은 변환 행렬 B 또는 그 역행렬 ( B^{-1} ) 을 이용하여 수행
- 직교 기준(orthonormal basis) 인 경우 dot product 를 통해도 변환 가능
- B: 곰의 기준 벡터들을 내 좌표계에서 표현한 것
- ( B^{-1} ): 내 기준 벡터를 곰의 좌표계에서 표현한 것
Doing a transformation in a changed basis
1. 문제 설정
Bear의 기준 벡터:
- ( \mathbf{b}_1 = [3, 1] )
- ( \mathbf{b}_2 = [1, 1] )
벡터 ( \begin{bmatrix} x \ y \end{bmatrix} ) 가 Bear의 기준에서 주어졌을 때,
이 벡터에 45도 회전 변환을 적용하고자 함.
2. 회전 행렬 ( R ) (45도)
- 회전 행렬은 기본 좌표계 기준:
$$
R = \frac{1}{\sqrt{2}} \begin{bmatrix}
1 & -1 \
1 & 1
\end{bmatrix}
$$
3. 기준 변환 행렬 ( B )
- Bear의 기준을 내 기준에서 표현한 행렬:
$$
B = \begin{bmatrix}
3 & 1 \
1 & 1
\end{bmatrix}
$$
- 역행렬 ( B^{-1} ):
$$
B^{-1} = \frac{1}{2} \begin{bmatrix}
1 & -1 \
-1 & 3
\end{bmatrix}
$$
4. Basis에서의 변환 순서
Bear 기준 벡터 ( \mathbf{v}{\text{Bear}} ) 를 내 기준으로 변환:
( \mathbf{v}{\text{Me}} = B \cdot \mathbf{v}_{\text{Bear}} )내 기준에서 45도 회전 적용:
( \mathbf{v}'{\text{Me}} = R \cdot \mathbf{v}{\text{Me}} )결과를 다시 Bear 기준으로 변환:
( \mathbf{v}'{\text{Bear}} = B^{-1} \cdot \mathbf{v}'{\text{Me}} )
⇒ 전체 변환은 다음과 같이 표현 가능:
$$
\mathbf{v}'{\text{Bear}} = B^{-1} R B \cdot \mathbf{v}{\text{Bear}}
$$
5. 핵심 결론
- ( B^{-1} R B ) 는 Bear의 좌표계에서 수행된 회전 행렬을 의미함.
- 중요한 공식:
$$ T_{\text{new}} = B^{-1} R B $$
이 식은 기준이 변한 공간에서 변환을 수행하는 핵심 공식이다.
6. 응용
- 이 접근은 기준 좌표계가 직교가 아니더라도 사용할 수 있으며,
- PCA(주성분 분석) 와 같은 기법에서 새로운 기준축에서의 변환을 구현할 때 매우 유용하다.
7. 요약
- 기준이 바뀌면 변환 행렬도 바뀜.
- 기준 변환 + 변환 적용 + 기준 역변환의 조합을 사용해야 함.
- 공식:
$$
\text{Transformed Vector in New Basis} = B^{-1} R B \cdot \text{Vector in New Basis}
$$
Making Multiple Mappings, deciding if these are reversible: Orthogonal matrices
1. Transpose (전치행렬)
- 행렬 ( A )의 전치 ( A^T ): 행과 열을 뒤바꿈
- 즉, 원래 행렬 ( A )의 ( (i, j) ) 원소는 ( A^T )에서 ( (j, i) ) 위치에 존재함
- 예시:
$$
A = \begin{bmatrix} 1 & 2 \ 3 & 4 \end{bmatrix} \Rightarrow A^T = \begin{bmatrix} 1 & 3 \ 2 & 4 \end{bmatrix}
$$
2. Orthonormal Basis (직교 정규 기저)
행렬 ( A )의 열벡터 ( \mathbf{a}_1, \mathbf{a}_2, \dots, \mathbf{a}_n ) 이 다음 조건을 만족한다면:
- ( \mathbf{a}_i \cdot \mathbf{a}_j = 0 ) for ( i \ne j ) (서로 수직)
- ( \mathbf{a}_i \cdot \mathbf{a}_i = 1 ) for all ( i ) (단위 벡터)
이 조건을 만족하는 기저를 Orthonormal Basis 라고 부르며,
이 열벡터들로 구성된 행렬 ( A )를 Orthogonal Matrix (직교행렬) 라고 부름
3. Transpose = Inverse
중요 성질:
만약 ( A )가 직교행렬이라면,$$
A^T A = AA^T = I
$$→ 전치 행렬 ( A^T )이 ( A )의 역행렬이 됨
따라서:
$$
A^{-1} = A^T
$$
4. Orthogonal Matrix의 성질
모든 열벡터와 행벡터가 서로 직교하고 단위 벡터
공간을 보존함 (길이와 각도를 유지)
행렬식 (Determinant) 은 반드시:
$$
\det(A) = \pm 1
$$- ( +1 ): 공간의 방향 유지 (우수 좌표계)
- ( -1 ): 공간 반전 (좌수 좌표계)
5. 데이터 변환 관점에서의 이점
Orthonormal basis를 사용할 경우:
- 역행렬 계산이 쉬움 (( A^T ) 사용)
- 변환이 가역적
- 투영 (Projection) 계산이 단순한 점곱(Dot Product) 으로 가능
- 공간 왜곡 없이 보존됨
⇒ 데이터 과학에서는 가능한 한 직교행렬 기반의 변환 행렬을 선호
6. 요약
- 전치: 행렬의 행과 열을 교환
- 직교행렬: 열벡터가 직교 정규 기저인 행렬
- 직교행렬의 역행렬은 전치행렬
A^{-1} = A^T \quad \text{(if A is orthogonal)}
- 행렬식은 ( \pm 1 ), 공간 보존 및 가역성 보장
- 데이터 변환 시 계산 효율성과 직관성을 모두 제공함
'학사 > 아주대 융시공' 카테고리의 다른 글
[4학년][1학기][Coursera][Mathematics for ML][W10] (0) | 2025.07.02 |
---|---|
[4학년][1학기][Coursera][Mathematics for ML][W8] (1) | 2025.04.28 |
[4학년][1학기][Coursera][Mathematics for ML][W5] (0) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W7] (0) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W6] (1) | 2025.04.28 |
[4학년][1학기][Coursera][Mathematics for ML][W8]
시험 기간 이슈로 week6, 7을 건너뛰게 되었습니다.
Mathematics for Machine Learning: Linear Algebra
Coursera - Imperial College London
Link to Course
Matrices, Vectors, and solving simultaneous equation problems
Apples and Bananas 문제 복습
- 예를 들어, 어떤 가게에서 사과 2개, 바나나 3개를 사는데 8유로가 들었다고 하자.
- 다른 날에는 사과 10개, 바나나 1개를 사는데 13유로가 들었다.
- 이때 사과 1개, 바나나 1개의 가격을 알아내는 것이 목표.
이 문제는 단순한 simultaneous equations(연립 방정식) 문제이지만, Matrices(행렬) 을 이용해서 표현할 수 있다.
Matrix 표현
다음과 같은 형태로 행렬을 설정할 수 있다:
Coefficient Matrix:
$$
\begin{bmatrix}
2 & 3 \
10 & 1
\end{bmatrix}
$$Variable Vector:
$$
\begin{bmatrix}
a \
b
\end{bmatrix}
$$
- Result Vector:
$$
\begin{bmatrix}
8 \
13
\end{bmatrix}
$$
이것은 다음 연립방정식과 동일함:
$$
2a + 3b = 8, \quad 10a + 1b = 13
$$
Matrix의 연산 방법
- Matrix와 Vector를 곱할 때는 Row × Column 연산을 한다.
- 첫 번째 행을 변수 벡터와 내적하여 결과 벡터의 첫 번째 원소를 얻고, 두 번째 행으로 두 번째 원소를 얻는다.
- 즉,
- 첫 번째 행: (2a + 3b = 8)
- 두 번째 행: (10a + 1b = 13)
→ 이는 기존 연립방정식과 정확히 일치한다.
Matrix의 의미
- 행렬은 벡터를 회전(rotation) 하고 늘리거나 줄이는(stretch) 연산을 수행하는 도구이다.
- 또한 행렬은 벡터 공간을 변환하여 문제를 해결하는 데 사용된다.
- 즉, 행렬은 입력 벡터(input vector) 를 받아 출력 벡터(output vector) 로 변환하는 함수(function)처럼 동작한다.
Basis Vector의 변환
- 표준 단위벡터 ( e_1 = [1,0] ), ( e_2 = [0,1] )을 생각해보자.
행렬을 ( e_1 )에 곱하면:
- ( 2 \times 1 + 3 \times 0 = 2 )
- ( 10 \times 1 + 1 \times 0 = 10 )
결과:
$$
\begin{bmatrix}
2 \
10
\end{bmatrix}
$$
행렬을 ( e_2 )에 곱하면:
$$
\begin{aligned}
2 \times 0 + 3 \times 1 &= 3 \
10 \times 0 + 1 \times 1 &= 1
\end{aligned}
$$
결과:
$$
\begin{bmatrix}
3 \
1
\end{bmatrix}
$$
→ 행렬은 단위벡터들을 새로운 벡터로 변환(transform) 한다.
선형대수(Linear Algebra)의 의미
- Linear(선형성) : 입력 값을 상수로 곱하고 더하는 방식으로 변환한다는 의미. (비틀거나 접지 않는다.)
- Algebra(대수) : 수학적 기호를 다루고 조작하는 체계(system).
즉, Linear Algebra는
- 벡터와 벡터 공간을 수학적으로 다루고 변환하는 방법론이다.
- 동시에, 연립방정식을 푸는 것도 결국 벡터 공간을 변환하는 과정임을 알 수 있다.
Summary
- 사과와 바나나 문제는 연립방정식으로, 이를 행렬을 이용해 표현할 수 있다.
- 행렬은 입력 벡터를 받아서 출력 벡터로 변환한다.
- 행렬을 단위벡터에 곱하면, 새로운 위치로 이동된 벡터를 얻을 수 있다.
- Linear Algebra는 벡터와 그 변환에 관한 체계이며, 이 개념은 문제 해결에 필수적이다.
How Matrices Transform Space
Matrix와 공간 변환의 관계
- 이전에는 Matrix를 이용해 연립방정식을 표현하는 방법을 배웠고,
- Matrix의 각 열은 단위벡터 ( e_1, e_2 )에 대해 어떤 변화를 주는지를 나타낸다고 했음.
이번에는 다양한 종류의 Matrix가 공간에 어떤 변화를 일으키는지,
그리고 하나의 Matrix 변환 뒤에 또 다른 Matrix를 적용하는 composition(합성) 을 다룬다.
벡터 변환과 선형성
벡터 ( r )을 Matrix ( A )로 변환한다고 하자:
$$
A r = r'
$$
이때, 중요한 성질은 다음과 같다:
- ( r )에 어떤 스칼라 ( n )을 곱한 후 변환하면:
$$
A(nr) = n(Ar) = nr'
$$
- 두 벡터의 합을 변환하면:
$$
A(r+s) = Ar + As
$$
즉,
- Matrix 변환은 스칼라 곱과 벡터 합에 대해 선형(linear)이다.
- 이로 인해 변환 후에도 공간의 격자선(grid lines)은 평행하고 균등 간격을 유지한다.
- 공간은 늘어나거나(Stretch), 기울어질(Shear) 수 있지만, 원점은 변하지 않고, 공간이 휘거나(curvy) 왜곡되지는 않는다.
변환된 Basis Vector로 이해하기
- 원래 벡터 ( r )은 단위벡터들의 선형 결합으로 표현할 수 있다:
$$
r = n e_1 + m e_2
$$
- Matrix ( A )를 적용하면:
$$
A r = n (A e_1) + m (A e_2)
$$
- 여기서 ( A e_1, A e_2 )는 각각 변환된 Basis Vector로 생각할 수 있다:
$$
A e_1 = e_1', \quad A e_2 = e_2'
$$
따라서:
$$
A r = n e_1' + m e_2'
$$
→ 즉, 변환된 Basis Vector들의 선형 결합으로 결과를 얻을 수 있다.
구체적인 예시
Matrix ( A )는 이전 Apples and Bananas 문제에서 사용한 다음과 같은 행렬이다:
$$
A = \begin{bmatrix}
2 & 3 \
10 & 1
\end{bmatrix}
$$
벡터
$$
r = \begin{bmatrix}
3 \
2
\end{bmatrix}
$$
에 대해 계산해보자.
직접 계산하면:
$$
A r =
\begin{aligned}
& 2 \times 3 + 3 \times 2 = 6 + 6 = 12 \
& 10 \times 3 + 1 \times 2 = 30 + 2 = 32
\end{aligned}
$$
결과:
$$
\begin{bmatrix}
12 \
32
\end{bmatrix}
$$
Basis Vector를 통한 접근
벡터 ( r )은 다음처럼 표현할 수 있다:
$$
r = 3 \times \begin{bmatrix} 1 \ 0 \end{bmatrix} + 2 \times \begin{bmatrix} 0 \ 1 \end{bmatrix}
$$
Matrix를 적용하면:
$$
A r = 3(A e_1) + 2(A e_2)
$$
각 변환을 계산해보자:
$$ A e_1 = \begin{bmatrix} 2 \ 10 \end{bmatrix} $$
$$ A e_2 = \begin{bmatrix} 3 \ 1 \end{bmatrix} $$
따라서:
$$
A r = 3 \times \begin{bmatrix} 2 \ 10 \end{bmatrix} + 2 \times \begin{bmatrix} 3 \ 1 \end{bmatrix}
$$
계산하면:
$$
= \begin{bmatrix} 6 \ 30 \end{bmatrix} + \begin{bmatrix} 6 \ 2 \end{bmatrix}
= \begin{bmatrix} 12 \ 32 \end{bmatrix}
$$
직접 계산한 결과와 동일하다.
요약
- Matrix는 단순히 단위벡터들을 새로운 위치로 이동시킨다.
- 벡터 전체는 이동된 단위벡터들의 선형 결합으로 표현할 수 있다.
- Matrix 변환은 공간을 휘거나 비틀지 않고, 선형(linear) 변환만 일으킨다.
- 변환 후에도 벡터 합, 스칼라 곱 등 벡터 연산의 규칙은 그대로 유지된다.
Types of Matrices Transformation
1. Identity Matrix
- 단위행렬(Identity Matrix)은 아무것도 변환하지 않는 행렬이다.
- 구성:
$$
I = \begin{bmatrix}
1 & 0 \
0 & 1
\end{bmatrix}
$$
이 행렬을 벡터
$$ \begin{bmatrix} x \ y \end{bmatrix} $$
에 곱하면 결과는 변하지 않는다:
$$
I \begin{bmatrix} x \ y \end{bmatrix} = \begin{bmatrix} x \ y \end{bmatrix}
$$
2. Scaling
- 대각선에 서로 다른 값이 있으면 축 방향으로 공간이 늘어나거나 줄어든다.
예:
$$
\text{Scaling Matrix} = \begin{bmatrix}
3 & 0 \
0 & 2
\end{bmatrix}
$$
- x축은 3배, y축은 2배로 스케일됨
- 만약 스케일 값이 1보다 작으면, 해당 방향으로 공간이 압축(squish)된다.
3. Reflection (뒤집기)
x축 반전
$$
\begin{bmatrix}
-1 & 0 \
0 & 1
\end{bmatrix}
$$
- x축을 기준으로 좌우 반전
y축 반전
$$
\begin{bmatrix}
1 & 0 \
0 & -1
\end{bmatrix}
$$
- y축을 기준으로 위아래 반전
원점 대칭 (Inversion)
$$
\begin{bmatrix}
-1 & 0 \
0 & -1
\end{bmatrix}
$$
- 모든 방향 반전 (x, y 둘 다 뒤집음)
45도 대칭 (축 뒤바꾸기)
$$
\begin{bmatrix}
0 & 1 \
1 & 0
\end{bmatrix}
$$
- x축과 y축을 서로 교환하는 효과 (45도 대칭)
또는:
$$
\begin{bmatrix}
0 & -1 \
-1 & 0
\end{bmatrix}
$$
- 반대 방향으로 교환하는 45도 대칭
4. Shear (전단 변환)
- 한 방향만 변형시키는 변환
예를 들어, e1은 그대로 두고, e2를 옆으로 밀면:
$$
\text{Shear Matrix} = \begin{bmatrix}
1 & 0 \
1 & 1
\end{bmatrix}
$$
- 이 변환은 원래 정사각형을 평행사변형으로 변형시킨다.
5. Rotation (회전)
- 공간을 회전시키는 변환
- 90도 회전 행렬 예:
$$
\text{90도 회전 Matrix} = \begin{bmatrix}
0 & 1 \
-1 & 0
\end{bmatrix}
$$
- 일반적인 2D 회전 행렬은 각도 ( \theta )에 대해 다음과 같다:
$$
\text{Rotation Matrix} =
\begin{bmatrix}
\cos \theta & \sin \theta \
-\sin \theta & \cos \theta
\end{bmatrix}
$$
- theta가 양수일 때, 반시계 방향 회전
- 예를 들어, -90도 회전이면 다음과 같이 계산한다:
$$
\sin(-90^\circ) = -1
$$
6. 데이터 과학에서의 활용
- 얼굴 인식(facial recognition)처럼 데이터의 orientation(방향성)을 맞추기 위해
Stretch, Mirror, Shear, Rotation 변환을 종종 사용한다. - 예를 들어, 얼굴을 카메라 방향에 맞추기 위해 회전 변환을 적용할 수 있다.
Summary
변환 종류 | 특징 |
---|---|
Identity | 변환 없음 |
Scaling | 특정 축 방향으로 확대/축소 |
Reflection | 좌우, 위아래 뒤집기 |
Inversion | 원점 기준 전체 반전 |
Shear | 한 방향으로 밀기(평행사변형) |
Rotation | 특정 각도만큼 회전 |
Matrix는 공간을 변환하는 다양한 방법을 제공하며, 이들을 조합하여 복잡한 변환을 구성할 수 있다.
Composition or Combination of Matrix Transformations
1. 변환(Transformation) 조합의 필요성
- 복잡한 형태 변환(예: 얼굴 이미지 변형)은 회전(Rotation), 전단(Shear), 반사(Reflection), 확대/축소(Scaling) 변환을 조합해서 만들 수 있다.
- 변환을 순서대로 적용하여 복합적인 효과를 낼 수 있음.
2. 변환 순서: ( A_1 ) 후 ( A_2 )
벡터 ( r )에 대해:
- 먼저 변환 ( A_1 )을 적용
- 그 결과에 다시 변환 ( A_2 )를 적용
결국, 전체 변환은 ( A_2 A_1 r ) 이 된다.
3. 구체적인 예시
Step 1: Basis Vectors
초기 Basis Vectors:
$$
e_1 = \begin{bmatrix} 1 \ 0 \end{bmatrix}, \quad e_2 = \begin{bmatrix} 0 \ 1 \end{bmatrix}
$$
Step 2: 첫 번째 변환 ( A_1 ) — 90도 반시계 방향 회전
회전 행렬:
$$
A_1 = \begin{bmatrix}
0 & -1 \
1 & 0
\end{bmatrix}
$$
변환 결과:
$$
\begin{aligned}
e_1' &= \begin{bmatrix} 0 \ 1 \end{bmatrix} \
e_2' &= \begin{bmatrix} -1 \ 0 \end{bmatrix}
\end{aligned}
$$
Step 3: 두 번째 변환 ( A_2 ) — 수직 반사(Vertical Reflection)
반사 행렬:
$$
A_2 = \begin{bmatrix}
-1 & 0 \
0 & 1
\end{bmatrix}
$$
변환 결과:
- ( e_1 )은 ( (-1, 0) )으로 반사
- ( e_2 )는 변하지 않음
Step 4: ( A_2 )를 ( A_1 ) 결과에 적용 (즉, ( A_2 A_1 ))
( A_2 )를 ( A_1 )에 곱한다:
$$
A_2 A_1 = \begin{bmatrix}
-1 & 0 \
0 & 1
\end{bmatrix}
\begin{bmatrix}
0 & -1 \
1 & 0
\end{bmatrix}
$$
계산:
$$
\begin{aligned}
\text{First column} &: (-1) \times 0 + 0 \times 1 = 0,\quad 0 \times 0 + 1 \times 1 = 1 \
\text{Second column} &: (-1) \times (-1) + 0 \times 0 = 1,\quad 0 \times (-1) + 1 \times 0 = 0
\end{aligned}
$$
결과:
$$
A_2 A_1 = \begin{bmatrix}
0 & 1 \
-1 & 0
\end{bmatrix}
$$
4. 변환 순서가 바뀔 경우 (즉, ( A_1 A_2 ))
( A_1 )을 ( A_2 )에 곱한다:
$$
A_1 A_2 = \begin{bmatrix}
0 & -1 \
1 & 0
\end{bmatrix}
\begin{bmatrix}
-1 & 0 \
0 & 1
\end{bmatrix}
$$
계산:
$$
\begin{aligned}
\text{First column} &: 0 \times (-1) + (-1) \times 0 = 0,\quad 1 \times (-1) + 0 \times 0 = -1 \
\text{Second column} &: 0 \times 0 + (-1) \times 1 = -1,\quad 1 \times 0 + 0 \times 1 = 0
\end{aligned}
$$
결과:
$$
A_1 A_2 = \begin{bmatrix}
0 & -1 \
-1 & 0
\end{bmatrix}
$$
5. 중요한 결론
- Matrix multiplication은 교환법칙(commutative)을 만족하지 않는다.
$$
A_2 A_1 \neq A_1 A_2
$$
- 하지만, 결합법칙(associative)은 성립한다.
$$
A_3 (A_2 A_1) = (A_3 A_2) A_1
$$
Summary
성질 | 설명 |
---|---|
선형성(Linearity) | 벡터 합과 스칼라 곱에 대해 선형 유지 |
결합법칙(Associativity) | 괄호 위치에 관계없이 순차 적용 가능 |
비가환성(Non-commutativity) | 적용 순서가 결과에 영향을 줌 |
Matrix를 조합하여 복합 변환을 만들 수 있으며, 특히 데이터 과학, 컴퓨터 비전(얼굴 인식 등)에서 변환 순서를 정확히 관리하는 것이 중요하다.
Solving the Apples and Bananas Problem: Gaussian Elimination
1. 문제 설정
- 두 번 쇼핑을 함:
- 2 apples + 3 bananas = 8 euros
- 10 apples + 1 banana = 13 euros
이를 Matrix 형태로 표현하면:
$$
A = \begin{bmatrix} 2 & 3 \ 10 & 1 \end{bmatrix}, \quad
r = \begin{bmatrix} a \ b \end{bmatrix}, \quad
s = \begin{bmatrix} 8 \ 13 \end{bmatrix}
$$
- 식은 다음과 같이 정리할 수 있음:
$$
A r = s
$$
2. 역행렬(Inverse)을 통한 풀이 아이디어
- 역행렬 ( A^{-1} )이 존재하면:
$$
A^{-1} A = I
$$
- 양변에 ( A^{-1} )을 곱하면:
$$
A^{-1} A r = A^{-1} s
$$
즉,
$$
r = A^{-1} s
$$
- 역행렬을 구할 수 있다면 문제를 일반적으로 해결할 수 있음.
3. 굳이 역행렬을 구하지 않고도 풀 수 있는 방법: 소거법(Elimination)
예시: 3가지 품목(apple, banana, carrot)
Matrix:
$$
A = \begin{bmatrix}
1 & 1 & 3 \
1 & 2 & 4 \
1 & 1 & 2
\end{bmatrix}
$$
Vector:
$$
s = \begin{bmatrix}
15 \ 21 \ 13
\end{bmatrix}
$$
Row 1: 1 apple + 1 banana + 3 carrots = 15
Row 2: 1 apple + 2 bananas + 4 carrots = 21
Row 3: 1 apple + 1 banana + 2 carrots = 13
Step 1: Row Operation (Elimination)
- ( R_2 - R_1 ) :
$$
(1,2,4) - (1,1,3) = (0,1,1)
$$
- ( R_3 - R_1 ) :
$$
(1,1,2) - (1,1,3) = (0,0,-1)
$$
오른쪽 벡터도 동일하게 연산:
- ( 21 - 15 = 6 )
- ( 13 - 15 = -2 )
Step 2: 삼각형 형태로 정리 (Echelon Form)
변형된 행렬:
$$
\begin{bmatrix}
1 & 1 & 3 \
0 & 1 & 1 \
0 & 0 & -1
\end{bmatrix}
$$
오른쪽:
$$
\begin{bmatrix}
15 \ 6 \ -2
\end{bmatrix}
$$
Step 3: Back Substitution
- 세 번째 식에서 바로 알 수 있음:
$$
-1 \times c = -2 \quad \Rightarrow \quad c = 2
$$
- 두 번째 식에 ( c = 2 )를 대입:
$$
1 \times b + 1 \times 2 = 6 \quad \Rightarrow \quad b = 4
$$
- 첫 번째 식에 ( b = 4, c = 2 )를 대입:
$$
1 \times a + 1 \times 4 + 3 \times 2 = 15 \quad \Rightarrow \quad a = 5
$$
4. 최종 해
$$
a = 5, \quad b = 4, \quad c = 2
$$
- Apple: 5 euros
- Banana: 4 euros
- Carrot: 2 euros
5. 요약
용어 | 설명 |
---|---|
Elimination | 하나의 row를 다른 row에서 빼서 하위 요소를 0으로 만드는 과정 |
Echelon Form | 주대각선 아래가 모두 0인 삼각형 형태의 행렬 |
Back Substitution | 마지막 식부터 역방향으로 값을 대입하여 해를 구하는 과정 |
결과 | 원래 행렬을 Identity Matrix로 변환 |
변형 과정:
$$
\text{최종 행렬} =
\begin{bmatrix}
1 & 0 & 0 \
0 & 1 & 0 \
0 & 0 & 1
\end{bmatrix}
$$
6. 중요한 포인트
- 역행렬 없이도 Gaussian Elimination을 통해 문제를 해결할 수 있다.
- 하지만, 역행렬을 구하면 임의의 ( s )에 대해 ( r )을 빠르게 구할 수 있다.
- Gaussian Elimination은 연산 수가 적고 매우 효율적인 방법이다.
Going from Gaussian Elimination to Finding the Inverse Matrix
1. 문제 설정
- 3×3 행렬 ( A )와 그 역행렬 ( B )가 존재한다고 하자.
$$
A \times B = I
$$
- 예시로 사용하는 ( A ):
$$
A = \begin{bmatrix}
1 & 1 & 3 \
1 & 2 & 4 \
1 & 1 & 2
\end{bmatrix}
$$
- ( B )는 다음과 같은 미지수로 구성된 행렬이다:
$$
B = \begin{bmatrix}
b_{11} & b_{12} & b_{13} \
b_{21} & b_{22} & b_{23} \
b_{31} & b_{32} & b_{33}
\end{bmatrix}
$$
여기서 ( b_{ij} )는 ( i )번째 행, ( j )번째 열의 원소를 의미한다.
- Identity Matrix ( I ):
$$
I = \begin{bmatrix}
1 & 0 & 0 \
0 & 1 & 0 \
0 & 0 & 1
\end{bmatrix}
$$
2. 역행렬을 구하는 아이디어
- ( A \times B = I ) 이므로,
( B )는 ( A )의 역행렬 ( A^{-1} )이다. - 실제로는 다음과 같이 각각의 열(column)을 따로따로 푸는 방식으로 접근할 수 있다.
- 첫 번째 열을 풀 때는 ( A \times ) (B의 첫 번째 열) = (I의 첫 번째 열) 로 생각
- 두 번째 열, 세 번째 열도 동일
하지만! 모든 열을 한 번에 동시에 다루면 훨씬 효율적이다.
3. Gaussian Elimination 전체 과정을 통해 역행렬 구하기
초기 augmented matrix (확장된 행렬):
$$
\left[ \begin{array}{ccc|ccc}
1 & 1 & 3 & 1 & 0 & 0 \
1 & 2 & 4 & 0 & 1 & 0 \
1 & 1 & 2 & 0 & 0 & 1
\end{array} \right]
$$
Step 1: 첫 번째 열을 기준으로 제거
- ( R_2 - R_1 ) :
$$
(1,2,4) - (1,1,3) = (0,1,1)
$$
- ( R_3 - R_1 ) :
$$
(1,1,2) - (1,1,3) = (0,0,-1)
$$
오른쪽 벡터도 동일하게 갱신:
- ( (0,1,0) - (1,0,0) = (-1,1,0) )
- ( (0,0,1) - (1,0,0) = (-1,0,1) )
변형된 행렬:
$$
\left[ \begin{array}{ccc|ccc}
1 & 1 & 3 & 1 & 0 & 0 \
0 & 1 & 1 & -1 & 1 & 0 \
0 & 0 & -1 & -1 & 0 & 1
\end{array} \right]
$$
Step 2: 대각 성분을 1로 맞추기
- 세 번째 행 ( R_3 )을 (-1)로 나눔:
$$
R_3 \div (-1)
$$
변형 결과:
$$
\left[ \begin{array}{ccc|ccc}
1 & 1 & 3 & 1 & 0 & 0 \
0 & 1 & 1 & -1 & 1 & 0 \
0 & 0 & 1 & 1 & 0 & -1
\end{array} \right]
$$
Step 3: Back Substitution (역방향 대입)
- 세 번째 행을 이용해 두 번째 행에서 제거:
$$
R_2 \leftarrow R_2 - (1) \times R_3
$$
- 세 번째 행을 이용해 첫 번째 행에서 제거:
$$
R_1 \leftarrow R_1 - (3) \times R_3
$$
변형 결과:
$$
\left[ \begin{array}{ccc|ccc}
1 & 1 & 0 & -2 & 0 & 3 \
0 & 1 & 0 & -2 & 1 & 1 \
0 & 0 & 1 & 1 & 0 & -1
\end{array} \right]
$$
- 두 번째 행을 이용해 첫 번째 행에서 제거:
$$
R_1 \leftarrow R_1 - (1) \times R_2
$$
최종 결과:
$$
\left[ \begin{array}{ccc|ccc}
1 & 0 & 0 & 0 & -1 & 2 \
0 & 1 & 0 & -2 & 1 & 1 \
0 & 0 & 1 & 1 & 0 & -1
\end{array} \right]
$$
4. 최종 결과: 역행렬
오른쪽 부분이 바로 ( A^{-1} ):
$$
A^{-1} =
\begin{bmatrix}
0 & -1 & 2 \
-2 & 1 & 1 \
1 & 0 & -1
\end{bmatrix}
$$
5. 요약
용어 | 설명 |
---|---|
Elimination | 위 삼각 형태로 만들기 위해 row를 변환 |
Back Substitution | 아래에서부터 값들을 차례로 구하는 과정 |
역행렬 | ( A^{-1} )을 구하면, 어떤 ( s )가 주어져도 ( r = A^{-1}s )로 바로 해를 구할 수 있음 |
6. 중요한 포인트
- Gaussian Elimination 과정을 통해 역행렬을 구할 수 있다.
- 수학적으로는
$$ A \times A^{-1} = I$$
가 항상 성립한다. - ( A^{-1} )을 알고 있으면, 모든 우변 ( s )에 대해 빠르게 해를 찾을 수 있다.
- 이 방법은 특히 고차원(수백×수백) 문제에서도 유용하다.
'학사 > 아주대 융시공' 카테고리의 다른 글
[4학년][1학기][Coursera][Mathematics for ML][W10] (0) | 2025.07.02 |
---|---|
[4학년][1학기][Coursera][Mathematics for ML][W9] (0) | 2025.07.02 |
[4학년][1학기][Coursera][Mathematics for ML][W5] (0) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W7] (0) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W6] (1) | 2025.04.28 |
[4학년][1학기][Coursera][Mathematics for ML][W5]
Mathematics for Machine Learning: Linear Algebra
Coursera - Imperial College London
Link to Course
Modulus and inner product
Vector
는 length와 direction을 가지고 있음- 서로 orthogonal(직교)하는 두 개의 unit vector를 i와 j를 사용해 좌표계를 설정
- 임의의 vector
r
은 다음과 같이 표현r=a⋅i+b⋅j
- Unit vector는 길이가 1인 vector
- hat 기호를 써서 나타냄
- Pythagoras theorem을 이용하면 vector
r
의 길이는
$$ ∣r∣= \sqrt{(a^2+b^2)} $$
- 이 표현은 좌표계를 사용하는 vector의 일반적인 크기 정의
Dot product
- 내적, dot product는 두 vector를 곱하는 방법 중 하나
- 두 vector
r
과s
가 있을 때, 각각의 성분을 곱하고 그 합을 구함
$$r⋅s=(r_i * s_i)+(r_j * s_j)$$ - Dot product의 결과는 vector가 아니라
Scalar
, 즉 숫자 하나
Properties of dot product
- 교환 법칙(Commutative)
- Dot product는 두 vector의 순서를 바꿔도 결과가 변하지 않음
$$ r⋅s=s⋅r $$
- 분배 법칙(Distributive over Addition)
- 덧셈에 대해 분배 법칙을 만족
- 세 vector
r
,s
,t
가 있을 때
$$ r⋅(s+t)=r⋅s+r⋅t $$
- 스칼라 곱에 대한 결합 법칙(Associativity over Scalar Multiplication)
- Scalar 곱에 대해 결합 법칙 만족
- Scalar
a
가 있을 때
$$ r⋅(as)=a(r⋅s) $$
Dot product과 modulus의 관계
- Vector를 자기 자신과 내적하면 각 성분의 제곱 합을 얻음
$$ r⋅r=r_1^2 +r_2^2 +⋯+r_n^2 $$
이 값은 vector의 크기 제곱과 동일
$$ r⋅r=∣r∣^2 $$Vector의 크기를 구할 때는 다음과 같은 편리한 공식 성립
$$ |r| = \sqrt{r⋅r} $$
Summary
벡터의 기본 연산(덧셈, 스칼라 곱)을 통해 벡터를 정의할 수 있다.
벡터의 크기(length)는 각 성분의 제곱 합의 제곱근으로 정의된다.
내적(dot product)은 벡터 간 곱의 한 종류이며, 결과는 숫자(스칼라)이다.
내적은 교환법칙, 분배법칙, 스칼라 곱에 대한 결합법칙을 만족한다.
벡터의 크기와 내적 사이에는 다음과 같은 중요한 관계가 있다:
$$ |r| = \sqrt{r⋅r} $$
Cosine and dot product
Cosine rule
길이가
a
,b
,c
인 세 변으로 이루어진 삼각형
$$ c^2 =a^2 +b^2 −2abcosθ $$θ는 변 𝑎와 변 𝑏 사이의 각도
Vector 표현으로 바꿔보자
r
,s
가 있고 그 사이 각도를 θ두 vector를 이용하여 삼각형을 만들 수 있고
Vector의 뺄셈(r-s)을 이용하면 세 번째 변은 Vector
r-s
로 표현Cosine rule을 Vector 표기법으로 다시 쓰면 다음과 같음
$$ ∣r−s∣^2 =∣r∣^2 +∣s∣^2 −2∣r∣∣s∣cosθ $$여기서 ∣𝑟∣, ∣𝑠∣는 각각 벡터 𝑟과 𝑠의 크기(길이)를 나타냄
Vector dot product를 이용한 전개
- 임의의 벡터의 크기의 제곱은 자기 자신과 내적한 값과 같다.
$$ ∣r−s∣^2 =(r−s)⋅(r−s)$$
전개하면
$$ (r−s)⋅(r−s)=r⋅r−r⋅s−s⋅r+s⋅s $$
이를 간단하게 정리하면,
최종적으로 아주 중요한 내적의 정의를 얻을 수 있음
$$ r⋅s=∣r∣∣s∣cosθ $$
Dot product의 의미 해석
- 내적은 두 vector의 크기와 사이의 각도의 Cosine 값에 따라 결정됨
- 두 vector가 같은 방향을 향하면
- theta가 0이므로 두 vector 크기에 1을 곱함
- 이때 내적이 최대값이며 항상 양수
- 두 vector가 직각으로 만나면
- theta가 90이므로 0을 곱함
- 이때 내적은 0이 됨
- 두 vector는 orthogonal
- 두 vector가 정반대 방향이면
- theta가 180이므로 (-1)을 곱함
- 내적은 음수가 되며
- 방향은 서로 반대
Vector간 방향성의 정량화
내적을 통해 우리는 두 vector가 얼마나 비슷한 방향을 향하고 있는지 알 수 있음
내적 값이
- 크고 양수일수록 두 vector는 거의 같은 방향
- 0에 가까울수록 두 vector는 직교
- 음수일수록 두 vector는 반대 방향
Projection
Scalar projection
- 두 vector
r
,s
가 있을 때s
를r
위에 투영 - 두 vector 사이 각도 θ가 있음
- Cosine을 이용해 각도 θ의 Adjacent side(인접변)의 길이를 구할 수 있음
$$ cosθ= 인접변의 길이/∣S∣ $$
R⋅S=∣R∣∣S∣cosθ 에서
∣𝑆∣cos𝜃 부분은 바로 벡터 𝑆를 벡터 𝑅 위에 투영했을 때의 길이(인접변의 길이)와 정확히 일치
벡터 𝑅 방향으로 𝑆가 만든 그림자의 길이가 바로 투영
만약 벡터 𝑆가 벡터 𝑅에 직각(orthogonal)이라면, 투영 길이는 0이 될 것
$$ Scalar Projection of S onto R= \frac{R⋅S}{∣R∣} $$
- 이는 Scalar이며 vector
S
가R
방향으로 얼마나 겹쳐있는 지 나타내는 양
Vector projection
- Scalar projection은 방향성이 없음
- 방향 정보를 포함하기 위해 vector projection을 사용
$$ Vector Projection of S onto R = (\frac{R⋅S}{∣R∣^2})*R$$
- Scalar projection에 vector
R
의 방향을 나타내는 unit vector를 곱한 것
𝑅 / ∣𝑅∣ 는 벡터 𝑅의 단위벡터(unit vector)이며, 벡터 투영은 벡터 𝑅 방향으로 향하는 하나의 벡터임
스칼라 투영: 벡터가 다른 벡터 방향으로 얼마나 겹쳐 있는지의 크기(길이)만을 나타낸다.
벡터 투영: 스칼라 투영과 더불어 방향 정보까지 나타내는 완전한 벡터로, 다른 벡터 방향으로 실제로 "겹쳐진" 벡터를 표현한다.
$$ Vector projection of S onto R=(\frac{R⋅S}{∣R∣} )\frac{R}{∣R∣} $$
앞부분인 𝑅⋅𝑆 / ∣𝑅∣ 는 스칼라 투영이며,
뒷부분인 𝑅 / ∣𝑅∣ 은 방향을 나타내는 단위벡터
직관적 이해
벡터 투영의 직관적 이해를 돕기 위해 예시를 들어보면 다음과 같습니다.
벡터 𝑆 위에 수직으로 빛을 비추어서 벡터 𝑅 방향으로 그림자를 만든다고 상상해 봅시다.
이때 만들어진 그림자의 길이가 스칼라 투영입니다.
그런데 우리는 이 그림자의 길이뿐만 아니라 그림자의 방향까지도 정확히 표현하고 싶습니다. 이때 벡터 투영이 필요합니다.
벡터 투영은 "그림자의 길이와 방향을 모두 포함한 벡터"입니다.
즉, 벡터 투영은 원래 벡터 𝑅과 같은 방향으로 향하며, 그 크기는 스칼라 투영의 크기와 같습니다.
Practice Assignment
83.33점 pass
Chaning basis
- 기저 변환
- 한 좌표계에서 다른 좌표계로 vector를 변환하는 방법(changing basis)
- Vector
r
은 원점(origin)에서 출발하여 공간 상 어떤 지점으로 향하는 기하학적 객체 - 일반적으로 orthogonal unit vectors
e1
,e2
로 이루어진 좌표계를 사용
예를 들어,
단위벡터
𝑒1=[1,0], 𝑒2=[0,1]을 기준으로 벡터 𝑟이 "3칸 오른쪽, 4칸 위"를 의미한다면,
$$𝑟=3𝑒1+4𝑒2=[3,4]$$
- 좌표계를 정하는 방식은 임의적
- 반드시 unit vectors거나 직각일 필요 없음
- 임의의 다른 vector
b1
,b2
로 좌표계를 정의하면 기존 vectorr
도 새로운 좌표계의 숫자 조합으로 표현 가능 - 이러한 기준 vectors를 Basis vectors라고 부름
- 벡터 𝑟이 𝑒 기저에서는 [3,4]이지만, 𝑏 기저에서는 다른 숫자로 나타날 것
Orthogonal unit vectors를 활용환 좌표 변환
- 새로운 basis vectors
b``,
b2`가 orthogona하는 경우, dot product를 활용해 좌표 변환 가능 - 새로운 기저 벡터 𝑏1,𝑏2 가 다음과 같이 정의되어 있다고 하자.
$$𝑏1=[2,1], 𝑏2=[−2,4]$$
두 기저 벡터가 직교하는지 확인하려면 내적 계산
→ 내적 값은 0이므로 직교함
Projection을 이용한 좌표 변환
- Vector
r
을b1
,b2
의 방향으로 projection
b1 방향으로 투영
$$ Proj_{b_1} (r)= \frac{10}{5}b_1 =2[2,1]=[4,2] $$b1 방향으로 투영
$$ Proj_{b_2} (r)= \frac{10}{20}b_2 =\frac{1}{2}[-2,4]=[-1,2] $$두 projection의 합으로 원래 vector 확인
- 두 vector projection을 더하면 원래 vector
r
로 돌아옴
$$ Proj𝑏1(𝑟)+Proj𝑏2(𝑟)=[4,2]+[−1,2]=[3,4]$$
새로운 기저에서의 좌표값 표현
- Vector
r
은 새로운 basis vectorb1
,b2
를 기준으로 다음과 같은 좌표값을 가짐
$$ r = 2b_1 + \frac{1}{2}b_2$$
Summary
벡터는 좌표계와 독립적으로 존재하는 수학적 객체이다.
벡터를 표현하는 좌표계는 임의적이며, 필요에 따라 변경할 수 있다.
직교(orthogonal)하는 새로운 좌표계를 사용하면, 내적을 활용하여 손쉽게 좌표 변환을 수행할 수 있다.
벡터 투영(projection)을 이용하면 벡터를 새로운 기저 벡터의 좌표계로 간단히 나타낼 수 있다.
Practice Assignment: Changing basis
100점 pass
Basis, vector space, and linear independence
Basis is a set of n vectors that
- 서로가 서로의 linear combination으로 표현되지 않음
- 따라서 서로가 linearly independent임
- 이 vector들의 모든 가능한 선형 결합이 vector 공간 전체를 나타냄
- 즉, 공간을 span함
- Basis vector들이 n개라면 그 vector 공간은 n-dimensional
Linear independence의 의미
- 특정 vector를 다른 vector들간의 linear combination으로 나타낼 수 없음
- 만약 어떤 vector가 다른 vector들의 선형 결합으로 나타내어진다면, 그 vector는 linearly dependent임
만약
$$ b 3 =a 1 b 1 +a 2 b 2$$
여기서, a1, a2가 Scalar일 때
이것이 성립한다면, b3는 기존 두 vector와 같은 평면에 놓이며 선형 종속임
Basis vector의 특성
기저 벡터로 선택하는 벡터들은 다음과 같은 조건을 반드시 만족해야 함
서로 선형 독립이어야 한다.
서로의 선형 결합을 통해 공간 전체를 표현할 수 있어야 한다(공간을 생성).
다만, 다음과 같은 조건은 필수적이지 않지만 실질적으로는 편리하기 때문에 자주 사용됨
벡터들이 길이가 1인 unit vectors 이면 계산이 편리하다.
벡터들이 서로 orthogonal이면 더욱 계산이 편리하다.
이렇게 길이가 1이고 직교하는 기저 벡터의 집합을 정규 직교 기저(orthonormal basis) 라고 부름
좌표계의 변환과 기저의 변경
Basis vector를 변경할 때, 기존의 좌표축을 새 좌표축 위로 projection함
이때 다음과 같은 특징
좌표계의 축을 변경하면 벡터를 나타내는 성분 값은 달라질 수 있다.
그러나 이 좌표 변환은 여전히 벡터 공간의 규칙성을 유지한다.
벡터의 덧셈(vector addition)이나 스칼라 곱(scalar multiplication)과 같은 기본적인 선형 연산(linear operations)은 그대로 유지된다.
이런 변환 과정에서 공간은 휘거나 비틀어지지 않고, 단지 회전, 늘어남, 축소와 같은 선형(linear) 변환만이 일어난다. 바로 이 "선형성"이 선형대수(linear algebra)라는 이름의 핵심이다.
Summary
Basis : 벡터 공간을 생성하는 선형 독립인 벡터들의 집합.
Linear independence : 어떤 벡터가 다른 벡터의 선형 결합으로 표현될 수 없다는 의미.
기저 벡터의 개수가 벡터 공간의 차원을 정의한다.
기저는 반드시 단위벡터나 직교 벡터일 필요는 없지만, 그렇게 하면 계산이 편리해진다.
좌표계를 변경하는 과정에서 선형성은 유지되며, 공간 자체가 변형되지는 않는다.
직교 기저를 선택하면 dot product을 통해 손쉽게 좌표 변환이 가능하며, 직교하지 않으면 matrix을 이용한 보다 일반적인 변환이 필요하다.
'학사 > 아주대 융시공' 카테고리의 다른 글
[4학년][1학기][Coursera][Mathematics for ML][W9] (0) | 2025.07.02 |
---|---|
[4학년][1학기][Coursera][Mathematics for ML][W8] (1) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W7] (0) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W6] (1) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W5] (0) | 2025.04.05 |
[4학년][1학기][Coursera][Introduction to HW and OS][W7]
Introduction to Hardware and Operating System
Coursera - IBM
Link to Course
Module 5
Evaluating Computing Performance and Storage
Learning Objectives
- Identify the four key processor performance factors
- Evaluate RAM availability and usage
- Assess storage capacity and device types
- Understand network speed metrics and troubleshooting methods
Processor Performance Criteria
- Processor Speed (Clock Speed)
- Measured in GHz (Gigahertz)
- Higher speeds → faster task execution
- Number of Cores
- CPUs may have 2 to 64 cores
- More cores allow parallel task execution
- Related to Symmetric Multiprocessing (SMP)
- Bus Types and Speeds
- Address bus: sends memory addresses
- Data bus: carries data
- Control bus: sends control signals
- New standards: PCIe, HyperTransport, QPI
- Cache Memory
- Stores frequently used data for quick access
- Helps offset slower processing speeds
RAM (Random Access Memory)
- Temporary memory used to run apps, load websites, and edit files
- Measured in GB (Gigabytes)
- When RAM is full:
- Freezing, app crashes, blue screen, corrupted files
How to Check RAM in Windows:
- Open Task Manager → Performance → Memory
- Run Windows Memory Diagnostic for hardware issues
Storage Devices
Type | Speed | Notes |
---|---|---|
SSD | Fastest | Flash-based, expensive but reliable |
HDD | Moderate | Traditional spinning disks |
Hybrid Drives | Balanced | SSD for cache + HDD for storage |
Flash Memory | Varies | Portable (e.g., USB, SD cards) |
How to Check Disk Space:
- Open This PC from taskbar search → View under "Devices and Drives"
Network Speed & Connectivity
- Measured in Mbps or Gbps
- Use tools like speedtest.net to evaluate performance
How to Check Link Speed:
- Wi-Fi:
- Click Wi-Fi icon → Properties → Link Speed
- Ethernet:
- Search Ethernet Settings in Windows → View under Properties
Summary of Key Points
- Processor performance depends on speed, cores, bus type, and cache
- RAM availability impacts stability and multitasking
- SSD > Hybrid > HDD in terms of speed
- Check storage and RAM usage directly in Windows tools
- Use speed tests and network settings to assess connectivity issues
Workstation Evaluation and Setup
Learning Objectives
- Identify a user’s computing environment and requirements
- Evaluate computers based on hardware specifications
- Perform basic workstation setup tasks
Step 1: Understanding the User’s Needs
Location
- Office, home, mobile, or multi-site
Physical Conditions
- Desk, chair, lighting, outlets, security options, accessibility accommodations
Connectivity
- Wired for secure/confidential work
- Wi-Fi for general office/home use
- Cellular for mobile users
Data Storage Strategy
- Local, onsite network, or hybrid cloud
Step 2: Hardware & Peripheral Needs
Component | Considerations |
---|---|
RAM | 8 GB (web-based users), 16 GB (standard), upgradeable (power users) |
GPU | Required for graphics, big data tasks |
Storage | Adequate for local files or cache use |
Peripherals | Keyboard, mouse, monitor, speakers, scanner, etc. |
- Understand the connection type for each peripheral (USB, Bluetooth, etc.)
Step 3: Device Selection Considerations
- Desktops: Best performance, expandability
- Laptops/2-in-1s: Mobility, space-saving
- Evaluate:
- User needs
- Business requirements
- Available technology
- Budget constraints
Step 4: 6-Step Setup Process
- Reassess physical environment
- Unbox devices safely and read documentation
- Cable management
- Use short cables
- Bundle and label
- Electrical management
- Use labeled power cables
- Verify outlet amperage and accessibility
- Check ergonomics
- Monitor and chair height, arm and foot position, lighting
- Configure workstation
- OS settings: user login, keyboard, resolution
- Printer, audio, network, browser
- Remove bloatware
- Install productivity software
- Set up backup and security
Summary of Key Points
- A user’s job function, location, and accessibility guide the device decision
- The right hardware depends on task intensity (e.g., big data vs. email)
- A proper workstation setup involves:
- Environment check
- Unboxing and cable setup
- Ergonomic adjustments
- System configuration
Introduction to Troubleshooting
Learning Objectives
- Understand basic computer support concepts
- Apply troubleshooting procedures
- Use online and manufacturer support resources
- Summarize the CompTIA Troubleshooting Model
Basic Troubleshooting Concepts
- Determine the Problem
- Ask the user about recent changes
- Reproduce the issue
- Separate multiple problems
- Examine the Problem
- Check for simple causes (e.g., unplugged cable)
- Try multiple solutions
- If needed, escalate the issue
- Solve the Problem
- Create a plan, document steps
- Repair, replace, or combine both
- Confirm system functionality and finalize documentation
Common Computer Issues
- Loose cables, power issues
- BIOS or POST boot errors
- Blue/black screen
- OS problems or software crashes
- Monitor/display not working
Diagnostic Checklist
- Check for LEDs, power sounds
- Beep codes (use internet for decoding)
- Monitor connections
- Peripheral cables
Support Resources
- Search engines: Google, Bing, DuckDuckGo
- Online forums, community knowledge bases
- Manufacturer support pages and manuals
- Prepare:
- Device model, serial number
- Purchase date
- Issue description
CompTIA Troubleshooting Model
- Identify the Problem
- Gather info, duplicate, ask users, isolate issues
- Research
- Use knowledge bases or the internet
- Establish a Theory
- Question the obvious, divide & conquer
- Test the Theory
- Confirm or refine the theory
- Establish a Plan
- Consider all potential side effects
- Implement the Solution
- Escalate if necessary
- Verify Full System Functionality
- Apply preventive measures
- Document Everything
- Findings, steps, and outcomes
Summary of Key Points
- Troubleshooting is a step-by-step support method
- Start by identifying common, simple issues
- Use online and manufacturer resources for help
- Follow the CompTIA model for industry-standard troubleshooting
Advanced Microsoft Windows 10 Management and Utilities
Learning Objectives
- Perform advanced workstation management tasks
- Understand the role of drivers and how to update them
- Identify and use five essential Windows utilities
1. Policy Management
- Applies rules for:
- Passwords & retry limits
- Allowed programs
- User configurations
- Access via:
- Search “Group Policy” in Taskbar
- Edit group policy > User Configuration
2. Windows Task Manager
- Monitor apps and background processes
- Force quit with End Task
- Useful when software is frozen or unresponsive
3. Device Manager
- View and manage:
- Hardware components
- Interfaces (e.g., Intel ME Interface)
- Check status, update drivers, view resource use
- Useful for:
- Driver issues
- Firmware checks
4. Virtual Memory Management
- Use Task Manager to check RAM usage
- Open: Settings > Performance > Virtual Memory
- Adjust manually for high-memory apps
- Use Windows Memory Diagnostic for error checking
5. Service Management
- For advanced control of background services:
- Stop, restart, run, or ignore a service
- Optionally restart the system
- Helps resolve:
- Unresponsive software
- Resource bottlenecks
6. Drivers
- Enable communication between hardware and OS
- Symptoms of outdated drivers:
- Devices not working
- Use Device Manager > Right-click > Update Driver
7. Key Windows Utilities
Utility | Function |
---|---|
Memory Diagnostics | Detect hardware memory errors |
Performance Monitor | Monitor hardware and software performance |
Event Viewer | Log system activity, errors, and install issues |
Registry Editor | Modify program registration and disk location data |
Task Manager | View and manage running tasks and processes |
Summary of Key Points
- Group Policy improves device and data security
- Task Manager and Device Manager are core tools for diagnosis
- Drivers must be current for proper hardware communication
- Windows provides built-in utilities for diagnostics and system management
Introduction to Business Continuity Principles
Learning Objectives
- Understand the importance of business continuity
- Evaluate a fault tolerance system
- Explain the importance of disaster recovery planning
What is Business Continuity?
- Business continuity: a plan to minimize disruption and maintain operations during difficult events
- Built upon fault tolerance, which enables systems to run even if some components fail
- Aims to prevent single points of failure
Redundancy: The Key to Continuity
Redundancy = Extra capacity or backup that protects against failure
Types of Redundancy:
- Data Redundancy
- Same data exists in multiple locations (e.g., backups)
- Risk: inconsistency
- Solution: real-time syncing
- RAID (Redundant Array of Independent Disks)
- RAID 0: Improved performance, no fault tolerance
- RAID 1: Mirroring data for fault tolerance
- RAID 5: Secure, requires minimum 3 HDDs
- Network Redundancy
- Multiple paths and adapters
- Load balancing across servers
- Site Redundancy
- Entire backup site in case of total loss (e.g., natural disaster)
- Uses replication to sync data across locations
- Power Redundancy
- Two independent power sources
- UPS (Uninterruptable Power Supply) as cost-effective fallback
Backup Strategies
Backup Methods:
- Full: All files
- Incremental: Files changed since last full/incremental
- Differential: Files changed since last full
- Daily: Only today's changes
Backup Devices:
- USB drives
- External HDDs
- LAN servers
- Tape storage
- Cloud-based storage
Key Considerations:
- Cost: Hardware, software, training
- Location: Cloud + additional physical site
- Storage/time balance for effective recovery
Disaster Recovery
- Plan to restore IT functionality after disruption
- Must include:
- Clear procedures
- Scenario-specific strategies
- Rapid execution and response
Summary of Key Points
- Business continuity requires planning, redundancy, and disaster recovery
- Fault tolerance systems avoid single-point failures
- Backup strategies should align with business needs and resources
- Disaster recovery plans restore IT operations after outages
'학사 > 아주대 융시공' 카테고리의 다른 글
[4학년][1학기][Coursera][Mathematics for ML][W8] (1) | 2025.04.28 |
---|---|
[4학년][1학기][Coursera][Mathematics for ML][W5] (0) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W6] (1) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W5] (0) | 2025.04.05 |
[4학년][1학기][Coursera][Introduction to HW and OS][W4] (0) | 2025.03.30 |
[4학년][1학기][Coursera][Introduction to HW and OS][W6]
Introduction to Hardware and Operating System
Coursera - IBM
Link to Course
Module 4
Internal Computer Components
Learning Objectives
- Recognize internal components of a computer
- Understand the role of the motherboard
- Evaluate how data flows among internal systems
Motherboard Overview
- The motherboard is the main printed circuit board (PCB)
- Hosts:
- CPU socket
- RAM slots
- Chipset (northbridge & southbridge)
- I/O and peripheral connectors
- Acts as the communication backbone of the computer
Chipset Architecture
Component | Function |
---|---|
Northbridge | High-speed communication (CPU ↔ RAM, GPU); directly connected to CPU |
Southbridge | Slower components (USB, audio, BIOS); not directly connected to CPU |
- Together, the chipset manages data flow between CPU, memory, and peripherals
Buses and Data Flow
- A bus is a high-speed pathway (printed circuitry) on the motherboard
- Transmits:
- Control signals
- Addresses
- Data
- Example: Front-Side Bus (FSB)
- Connects CPU ↔ Northbridge (memory controller)
CPU Socket Types
- Socket: Interface that connects CPU to motherboard
- Types of socket architecture:
- PGA (Pin Grid Array):
- Pins on CPU, holes on socket
- Align and insert carefully (no force)
- LGA (Land Grid Array):
- Pins on motherboard, flat contact pads on CPU
- Newer Intel CPUs typically use LGA
- PGA (Pin Grid Array):
Power Connectors
- Provide electrical current to motherboard and components
- ATX connector: A common large connector from power supply to motherboard
- Other connectors vary depending on form factor and power needs
Summary of Key Points
- Internal components are all elements attached to the motherboard
- The motherboard facilitates communication between CPU, memory, and peripherals
- Chipsets (northbridge and southbridge) manage data flow across key areas
- Buses are internal highways for data/control signals
- Sockets allow CPUs to connect to the motherboard and vary by CPU generation
- Power connectors supply electricity to the board and its components
Data Processing and Storage
Learning Objectives
- Recognize the role of memory in a computing system
- Distinguish between memory slots and expansion slots
- Understand the functions of the BIOS and CMOS
Central Processing Unit (CPU)
- CPU is a silicon chip with billions of transistors
- Executes calculations using data stored in memory
- 32-bit CPU: 2-lane data bus
- 64-bit CPU: 4-lane bus → double the data per clock cycle
- Found in laptops, desktops, and servers
RAM and Memory Slots
- RAM (Random Access Memory): Temporarily stores working data
- Volatile → data lost when power is off
- Installed in memory slots on the motherboard
- RAM is cold pluggable (must be powered off to install)
RAM Types:
Type | Description |
---|---|
DRAM | Uses capacitors and transistors to store each bit |
SDRAM | Synchronous DRAM; faster than standard DRAM |
DDR / DDR3 / DDR4 | Double Data Rate; each generation is faster and more power-efficient |
SO-DIMM | Compact RAM used in laptops; smaller but uses more power |
- RAM speed: Measured in MHz (e.g., 1333–2133 MHz)
Expansion Slots
- Memory slots: Only accept RAM
- Expansion slots (e.g., PCI / PCIe):
- Used for graphics cards, sound cards, network adapters
- Add features and capabilities to the system
- Number and type depend on motherboard model
Disk Controller
- Allows CPU to communicate with storage devices
- Example: IDE controller
- Chip-based circuit that manages hard drive read/write
- Often includes cache memory for performance boost
BIOS and CMOS
Term | Function |
---|---|
BIOS | Firmware that handles input/output processes during startup |
CMOS | Memory chip that stores BIOS configuration settings |
- BIOS is preprogrammed on the motherboard
- Can be updated ("flashed") with correct version (check with manufacturer)
- CMOS powered by coin-sized battery
- When CMOS battery dies:
- System clock resets
- Hardware settings are lost
Summary of Key Points
- Internal components like CPU, RAM, BIOS, expansion cards connect via the motherboard
- RAM is stored in memory slots and varies by type, size, and speed
- Expansion slots (PCI/PCIe) allow feature upgrades (e.g., graphics)
- BIOS controls startup and I/O functions; CMOS stores its settings
- CMOS battery must be replaced when expired to retain BIOS configuration
Internal Storage
Learning Objectives
- Describe hard drive architecture and data flow
- Compare characteristics of PATA, IDE, SATA, SCSI, SSD drives
- Understand optical drive technologies
- Identify the role of expansion slots in storage
Traditional Internal Hard Drives
- Introduced by IBM in 1956
- Provide non-volatile, long-term data storage
- Use spinning platters and actuator arms with read/write heads
- Key components:
- Power connector: Supplies power
- Data connector: Transfers data
- Jumpers: Configures specific drive settings
ATA, IDE, and PATA Drives
Type | Description |
---|---|
IDE / ATA | Popular from 1980s–2003 |
PATA | Parallel version of ATA |
Speed | Ranged from 33 Mbps to 133 Mbps |
- Used ribbon cables for data connection
SATA Drives
- Introduced in 2003, using serial bus
- Much faster than ATA: up to 6 Gbps
- Common RPMs: 5400 / 7200
- Capacity: 250 GB to 30+ TB
- Standard for modern desktops and laptops
- Each SATA port supports one drive
SCSI Drives
- Known as "scuzzy"
- Introduced in 1986
- Fast (10,000–15,000 RPM)
- Discontinued around 1994
Solid-State Drives (SSD)
- Introduced in 1989
- Store data on non-volatile flash memory
- Faster than HDDs (up to 10–12 GB/s)
- Capacity: 120 GB to 2 TB (typically)
- More reliable but more expensive than SATA
- Also used in:
- External drives
- Hybrid drives (SSD as cache + SATA as storage)
Optical Drives
- Use CDs, DVDs, Blu-ray Discs
- Write/read via low-powered laser beam
- Store data in tiny pits on spiral tracks
Formats and Capacities
Format | Storage | Notes |
---|---|---|
CD | Up to 750 MB | Single-sided |
DVD | 4.7–17.1 GB | Single or dual-sided |
Blu-ray | 25–128 GB (per layer) | High-res video/audio, DRM by region |
- BD-XL drives needed for triple/quad-layer Blu-rays
Expansion Slots
- On the motherboard, used for:
- Adding storage controllers
- Supporting additional drives
Summary of Key Points
- Internal hard drives offer fast access and long-term, non-volatile storage
- SATA drives are standard today due to cost-efficiency and capacity
- SSDs are faster and more reliable but costlier
- Optical drives offer portable storage and are still used for media
- Blu-ray Discs support high-resolution content and regional protection
- Expansion slots allow extending storage capabilities via add-on cards
Display Cards and Sound Cards
Learning Objectives
- Define the function of a video card (GPU)
- Understand how sound cards handle audio signals
- Evaluate the role of MIDI controllers in audio production
Video Cards (Graphics Cards)
- Also called:
- Display adapter, Graphics card, Video adapter, GPU
- May be:
- Integrated (on the motherboard)
- Dedicated (plugged into an expansion slot)
Functions:
- Sends graphical data to:
- Monitors, TVs, Projectors
- Uses a Graphics Processing Unit (GPU) to:
- Accelerate graphics rendering
- Perform parallel processing for:
- Gaming
- Video editing
- Machine learning
Sound Cards (Audio Cards)
- Generate and process audio signals
- Functions:
- Analog-to-digital conversion (ADC):
- E.g., Microphone → Digital file
- Digital-to-analog conversion (DAC):
- E.g., MP3 → Speaker output
- Analog-to-digital conversion (ADC):
- Can be:
- Integrated on the motherboard (common in most PCs)
- Dedicated expansion cards (for higher quality sound)
MIDI Controllers
- MIDI (Musical Instrument Digital Interface): Standard for digital musical instruments
- MIDI Controller:
- Sends digital signals to PC or synthesizer
- Allows sequencing, recording, and virtual instrument control
- Commonly used by musicians for composing and producing music
Summary of Key Points
- Video cards (GPUs) process and send image data to displays
- Sound cards convert audio signals between analog and digital
- Integrated audio is usually sufficient for general users
- Dedicated sound cards are preferred for audio production
- MIDI controllers are essential tools for digital musicians, sending control signals to PCs and sound modules
Cooling and Fans
Learning Objectives
- Define system cooling
- Compare air cooling, passive cooling, and liquid cooling
- Evaluate the efficiency and trade-offs of liquid cooling
What Is System Cooling?
- Computers generate heat during operation
- System cooling prevents overheating of internal components
- Without proper cooling, parts like the CPU can be damaged
Cooling Methods
1. Passive Cooling
- Slows down the component's operating speed to reduce heat
- No moving parts (e.g., simple heatsinks without fans)
2. Active Cooling (Air Cooling)
- Uses powered fans to move air through the case
- Cool air drawn in from front vents, hot air expelled out the back
- Forced convection with heatsink + fan setup:
- Thermal paste fills microscopic gaps for better heat transfer
- Fan blows air over heatsink fins to dissipate heat
3. Liquid Cooling
- Similar to radiator systems in cars
- Circulates liquid through water blocks placed on hot chips (e.g., CPU, GPU)
- Heated liquid → radiator → cooled via fans → recirculates
- Quieter and more efficient, especially for:
- High-performance PCs
- Hot environments
Advantages and Disadvantages of Liquid Cooling
Advantage | Disadvantage |
---|---|
Quiet operation | Higher cost |
Efficient heat transfer | Risk of leakage inside system |
Effective in high-heat setups | Requires more maintenance |
Summary of Key Points
- System cooling is essential to protect components from heat damage
- Air cooling uses heatsinks, thermal paste, and fans
- Passive cooling slows down performance to reduce heat
- Liquid cooling is quieter and more effective, but costly and riskier
- Best choice depends on system use, heat level, and budget
'학사 > 아주대 융시공' 카테고리의 다른 글
[4학년][1학기][Coursera][Mathematics for ML][W5] (0) | 2025.04.28 |
---|---|
[4학년][1학기][Coursera][Introduction to HW and OS][W7] (0) | 2025.04.28 |
[4학년][1학기][Coursera][Introduction to HW and OS][W5] (0) | 2025.04.05 |
[4학년][1학기][Coursera][Introduction to HW and OS][W4] (0) | 2025.03.30 |
[4학년][1학기][Coursera][Introduction to HW and OS][W3] (0) | 2025.03.30 |