I. Systems of Equations and Sentences

1. “Linear algebra is systems of linear equations.”

Trong ML, hầu hết các mô hình đều được mô tả bằng linear algebra:

Ví dụ:

\[y = w_1 x_1 + w_2 x_2 + \cdots + w_n x_n + b\]

That’s a systems of linear equations (Basic linear regression).

2. “When you think of equations, you think of sentences.”

Ví dụ:

3. “Sentences that are giving you information about things in the world.”

Ví dụ::

⇒ We can infer: “Nam is taller than 160 cm.”

\[\begin{cases} A > B \\ B = 160 \end{cases} \quad \Rightarrow \quad A > 160\]

4. “Systems of sentences behave a lot like systems of equations.”

Ví dụ (linear regression với 2 điểm dữ liệu):

\[\begin{cases} 2x + y = 5 \\ x - y = 1 \end{cases}\]

Giống như trong ML, bạn có nhiều mẫu huấn luyện, và bạn cần tìm nghiệm (weights) phù hợp với tất cả.

5. “Systems of sentences combine themselves to give you more information.”

Ví dụ:

⇒ Kết hợp: “The ground will be wet today.”

Trong ML: mô hình học từ dữ liệu, rồi dự đoán cho input mới.

6. Example for system of sentences


Hệ thống này chứa nhiều thông tin như sentences và được gọi là a complete system.


The sentences lặp lại và do đó hệ thống này được gọi là dư thừa (redundant).


Hệ thống này được gọi là contradictory system vì con chó không thể vừa đen vừa trắng cùng một lúc, hãy nhớ rằng chúng ta có một con chó và nó chỉ có thể có một màu.


Non-singular: hệ có nghiệm duy nhất (complete system). Singular: hệ có vô số nghiệm (redundant system) hoặc hệ vô nghiệm (contradictory).


II. System of Linear Equations

1. From Sentences to Equations

Quy tắc chuyển đổi

1.1. Ví dụ 1

\[\begin{cases} d_B = 1, \text{ If the dog is black, else 0} \\ d_O = 1, \text{ If the dog is organce} \\ c_B, c_O \text{ Similar for cat} \end{cases} \quad \Rightarrow \quad \begin{cases} d_B + d_O = 1 \\ c_B + c_O = 1 \end{cases}\] \[\quad \Rightarrow \quad \begin{cases} d_B + d_O = 1 \\ c_B + c_O = 1 \\ d_B + c_B = 1 \end{cases}\]

1.2. Ví dụ 2

Câu: “The price of an apple an panana is $10”

Một phương trình, hai ẩn → vô số nghiệm.

Ví dụ nghiệm:

Bổ sung câu để đủ nghiệm duy nhất: “The apple costs twice the banana.” → a = 2b

\[\begin{cases} a + b = 10\\[4pt] a - 2b = 0 \end{cases} \quad\Rightarrow\quad \text{solve: } 2b + b = 10 \Rightarrow b=\tfrac{10}{3},\; a=\tfrac{20}{3}.\]

1.3. Quizzes

Quizz 1

You go two days in a row and collect this information:

Question: How much does each fruit cost?

Solution:


Quiz 2

You go two days in a row and collect this information:



Quiz 3

You go two days in a row and collect this information:

2.2. Systems of equations





2.3. A linear equation

2.4. From Linear equation to line








2.5 Systems of equations as lines


A geometric notion of singularity



2.6 Singular vs nonsingular matrices

Linear dependence and independence

The determinant - Linear dependence between rows

The determinant

Determinant and singularity