Matrix Operations

Visual guide to linear algebra fundamentals · 선형대수 시각 가이드

1. What is a Matrix?

행렬이란?

A matrix is a rectangular array of numbers in rows and columns. An m×n matrix has m rows and n columns.

Matrices are used everywhere: computer graphics (3D transformations), machine learning (neural network weights), economics (input-output models), and physics (quantum mechanics). A 2×2 matrix can rotate, scale, or shear a 2D shape.

행렬은 컴퓨터 그래픽스, 머신러닝, 경제학, 물리학 등 다양한 분야에서 활용됩니다. 2×2 행렬 하나로 2D 도형을 회전, 확대, 전단 변환할 수 있습니다.

[ ] 123 456 789 3×3 matrix

2. Matrix Addition

행렬 덧셈

Add corresponding elements. Both matrices must have the same dimensions: Cij = Aij + Bij

Matrix addition is commutative (A+B = B+A) and associative. In image processing, adding matrices can blend two images together — each pixel's RGB values are summed element-wise.

행렬 덧셈은 교환법칙과 결합법칙이 성립합니다. 이미지 처리에서 두 이미지를 합성할 때 각 픽셀의 RGB 값을 요소별로 더합니다.

[ 12 34 ] + [ 56 78 ] = [ 68 1012 ] element-wise addition

3. Matrix Multiplication

행렬 곱셈

Multiply row of A by column of B and sum. For A(m×n)·B(n×p), result is m×p.

Matrix multiplication is NOT commutative (AB ≠ BA in general). This is the backbone of deep learning — every neural network layer is essentially a matrix multiplication followed by an activation function.

행렬 곱셈은 교환법칙이 성립하지 않습니다 (AB ≠ BA). 딥러닝의 모든 신경망 레이어는 본질적으로 행렬 곱셈 후 활성화 함수를 적용하는 것입니다.

[ 1 2 3 4 ] · [ 5 6 7 8 ] 1×5 + 2×7 = 19 row × column → dot product

4. Determinant

행렬식

The determinant of a 2×2 matrix: det(A) = ad − bc. If det = 0, the matrix is singular.

Geometrically, the determinant represents the scaling factor of area (2D) or volume (3D) under the transformation. A negative determinant means the transformation flips orientation.

기하학적으로 행렬식은 변환에 의한 넓이(2D) 또는 부피(3D)의 배율을 나타냅니다. 음수 행렬식은 방향이 뒤집힘을 의미합니다.

det | a b c d | = ad bc det=0 → singular (non-invertible)

5. Inverse Matrix

역행렬

A·A⁻¹ = I (identity). Only square matrices with det ≠ 0 are invertible.

Inverse matrices "undo" transformations. In cryptography, encryption can be a matrix multiplication and decryption uses the inverse. For large matrices, computing the inverse directly is expensive — iterative methods are preferred.

역행렬은 변환을 "되돌리는" 역할을 합니다. 암호학에서 암호화는 행렬 곱셈, 복호화는 역행렬을 사용할 수 있습니다.

A × A⁻¹ = 1 0 0 1 Identity I A⁻¹ = (1/det) × adj(A)

6. Systems of Equations

연립방정식

Linear systems Ax = b are solved by x = A⁻¹b when A is invertible.

Real-world applications include circuit analysis (Kirchhoff's laws), traffic flow optimization, and balancing chemical equations. For large systems, Gaussian elimination or LU decomposition is more efficient than computing A⁻¹ directly.

실제 응용으로는 회로 분석(키르히호프 법칙), 교통 흐름 최적화, 화학 방정식 균형 등이 있습니다. 대규모 시스템에서는 가우스 소거법이나 LU 분해가 더 효율적입니다.

A x = b x = A⁻¹ b 2x+3y=8, x−y=1 → solve
Practice now → C:Matrix