If Part 1 sketched the full structure of Common Math 1, this article moves into our first unit: polynomial addition and subtraction. We will represent polynomials with coefficient arrays, use that representation to explain why the commutative and associative laws feel natural, and briefly preview how the same idea extends to two variables.
1. When Polynomials Meet Arrays
In high school, we often accept that polynomial addition follows the commutative and associative laws without looking closely at the reason. Once we rewrite a polynomial as a list of coefficients, the reason becomes much easier to see.
1.1 Expressing a Polynomial as an Array
Writing a polynomial as an array makes each operation more transparent. In this article, we always list coefficients from the highest power down to the constant term.
If
P(x)=anxn+an−1xn−1+⋯+a1x+a0,
then we store it as
[an,an−1,…,a1,a0].
So each position in the array corresponds to a specific power of x, and the value in that position is the coefficient.
Example:
P(x)=3x2+2x+5 → [3, 2, 5] from highest degree downward
Q(x)=x2+4x+1 → [1, 4, 1]
The key is that coefficients of the same power line up in matching positions. After that alignment, addition and subtraction become position-by-position operations. Multiplication is different, so in this post we focus on addition and subtraction first.
If a power is missing, we insert 0 in that position.
x3+2 becomes [1, 0, 0, 2]
[[5x-2|5x2]]:x becomes [5, -1, 0] if we only write the terms that appear
To align it with a cubic, we pad it as [0, 5, -1, 0]
This zero-padding step is what makes array addition work even when two polynomials have different degrees.
A 1-D array is just an ordered list
For this article, you do not need geometry. The important idea is simple: [3, 2, 5] is an ordered list of coefficients.
First slot: coefficient of x2
Second slot: coefficient of x
Third slot: constant term
If two polynomials use the same ordering and the same length, their addition works like adding two ordered lists entry by entry.
🎯 Try it: Enter a polynomial below to see how it becomes an array in real time.
1변수 다항식 → 배열 변환기
단일 화면 애니메이션으로 계수 배열 추출
준비
0%
x만 지원누락 차수는 0으로 채움
허용 예시3x^2 + 2x + 5x^3 - 4x + 12x^4 + 7
피해야 할 입력3y^2 + 2y + 53x2 + 2x3x^ + 1
정규화된 식 3x2 + 2x + 5
1
원본 다항식
2
항 분리
3
계수 강조
4
배열 형성
5
완성
현재 단계
준비
다항식을 입력하고 변환 버튼을 누르면 단계별로 계수를 추출합니다.
33x2+22x+55
3
2
5
입력 다항식3x2 + 2x + 5
[3,2,5]
[3, 2, 5]
추출된 계수 배열
식의 구조를 먼저 보고 어떤 계수가 필요한지 확인합니다.
1.2 Adding Polynomials via Arrays
Why bother with arrays?
Traditional polynomial addition tells you to “combine like terms.” For
(3x2+2x+5)+(x2+4x+1),
you hunt for x2 terms, then x terms, then constants.
With arrays the process collapses to a single idea:
once the coefficients are aligned by power, you add matching positions.
+=[3,2,5][1,4,1][4,6,6]
First entry: 3+1=4 (coefficient of x2)
Second: 2+4=6 (coefficient of x)
Third: 5+1=6 (constant term)
So array addition mirrors polynomial addition.
Here is the same idea with different degrees:
x3+25x2−x→[1,0,0,2]→[0,5,−1,0]
Now we can add position by position:
[1,0,0,2]+[0,5,−1,0]=[1,5,−1,2],
which corresponds to x3+5x2−x+2.
Benefits
Computer-friendly: arrays live in contiguous memory, so access is fast.
Parallelizable: each index is independent, so GPUs can add them simultaneously.
Scales smoothly: any degree works the same way.
NumPy specializes in this style of work. After the math idea is clear, we can use np.array to store coefficients and let Python add matching entries for us.
2.1 Why Do the Commutative and Associative Laws Hold?
Commutative law (A+B=B+A)
Once polynomials are written in a fixed coefficient order, polynomial addition is defined position by position. Each pair of coefficients is a real number, so pi+qi=qi+pi by the commutative law of real-number addition.
[3,2,5]+[1,4,1]=[1,4,1]+[3,2,5]=[4,6,6].
Associative law ((A+B)+C=A+(B+C))
For the same reason, grouping does not matter. Each position follows the associative law of real-number addition.
You can even verify it directly with np.array_equal:
💻 Python (NumPy)
A = np.array([2, 3, -1, 4]) # 2x³ + 3x² - x + 4B = np.array([1, -2, 3, 1]) # x³ - 2x² + 3x + 1C = np.array([0, 1, 0, 2]) # x² + 2left = (A + B) + Cright = A + (B + C)print(np.array_equal(left, right)) # Trueprint(f"(A + B) + C = {left}")print(f"A + (B + C) = {right}")print(f"A + B == B + A: {np.array_equal(A + B, B + A)}")
Summary
Law
Array formulation
Based on
Commutative
[pi]+[qi]=[qi]+[pi]
Commutative law of real-number addition
Associative
([ai]+[bi])+[ci]=[ai]+([bi]+[ci])
Associative law of real-number addition
2.2 Check With Practice Problems
Problem 1 Express the following polynomials as arrays and add them:
A(x)=2x3+3x2−x+4
B(x)=x3−2x2+3x+1
Solution
A → [2, 3, -1, 4]
B → [1, -2, 3, 1]
A+B → [3, 1, 2, 5]
Converted back: 3x3+x2+2x+5
Problem 2 Explain why the following equality holds using array operations:
(2x2+3x+1)+(x2−2x+4)=(x2−2x+4)+(2x2+3x+1).
Solution
Left: [2, 3, 1] + [1, -2, 4] = [3, 1, 5]
Right: [1, -2, 4] + [2, 3, 1] = [3, 1, 5]
Therefore the equality holds by the commutative law.
🧠 Practice: Convert polynomials to arrays and add/subtract them in the quiz below.
다항식 배열 변환 퀴즈
문제별 계수 배열 입력과 즉시 피드백
다항식 배열 변환 퀴즈
1 / 3
진행률33%
Write the polynomial in array form (descending):
3x^{2} + 2x + 5
형식: [x²계수, x계수, 상수] (예: [3, 2, 5])
3. The Principle Behind Subtraction
3.1 Negating an Array Equals Multiplying by −1
Subtraction is just a special form of addition: subtracting Q(x) means adding −Q(x).
If
Q(x)=q2x2+q1x+q0,
then its coefficient array is [q_2, q_1, q_0], and the coefficient array of −Q(x) is [-q_2, -q_1, -q_0]. In other words, multiply every entry by -1.
Example
P(x)=3x2+2x+5 → [3, 2, 5]
Q(x)=x2+4x+1 → [1, 4, 1]
Steps for P(x)−Q(x):
Flip Q’s signs: −Q(x)=−x2−4x−1 → [-1, -4, -1]
Add: [3, 2, 5] + [-1, -4, -1] = [2, -2, 4]
Convert back: 2x2−2x+4
This works because subtraction can reuse the same algorithm as addition—just apply a sign change.
NumPy uses the - operator or np.polysub to do the job; -Q automatically multiplies each entry by −1.
💡 Takeaway: once we write polynomials as coefficient arrays in a fixed order, addition and subtraction follow the same laws as real-number addition. The array representation makes that structure visible.
🎯 Keep practicing:
다항식 덧셈/뺄셈 연습
3단계(배열 변환 → 배열 연산 → 과정 확인)
다항식 덧셈/뺄셈 연습
Phase 1/3
배열 변환 33%
주어진 다항식을 배열로 변환하세요
A(x) = 0
B(x) = 0
Q1. A(x)를 배열로 표현하시오
Q2. B(x)를 배열로 표현하시오
4. Next Step: Moving to Two Variables
We now understand how 1-variable polynomials behave as arrays. The next step is to organize coefficients for polynomials in two variables.
4.1 Why Two Variables?
Many real phenomena cannot be described with a single variable:
Field
Example
Variables
Physics
Electric field distribution
E(x,y)
Economics
Cost function
C(x,y) (usage of two materials)
Image processing
Pixel intensity
2‑D position (x,y)
Meteorology
Temperature map
T(lat,lon)
4.2 Arrays Become Matrices
For P(x,y)=3x2y+2xy2+5x+7y+1, we use a coefficient matrix. Each entry records the coefficient of one power pair xiyj.
For this example:
1 is the coefficient of x0y0
7y is the coefficient of x0y1
5x is the coefficient of x1y0
2xy2 is the coefficient of x1y2
3x2y is the coefficient of x2y1
P=150703020
Rows follow powers of x (x0,x1,x2)
Columns follow powers of y (y0,y1,y2)
So a 1-variable polynomial uses a 1-D coefficient array, while a 2-variable polynomial uses a 2-D coefficient matrix. Just as before, addition works by matching entries that represent the same powers.
Real-world cases in image processing and simulations
5. Wrap-Up
We learned how coefficient arrays organize polynomial terms and make addition and subtraction easier to explain. Once coefficients are aligned by power, the commutative and associative laws follow directly from the corresponding laws for real numbers.
With 1-variable polynomials organized this way, we now have the basic structure in hand, and we have even glimpsed how it begins to extend to two variables. In the next part, we make that extension fully explicit.
💬 댓글
이 글에 대한 의견을 남겨주세요