English translation
Define coefficient matrix A
A homogeneous system always has the trivial (zero) solution. For a nonhomogeneous system, we must first determine whether a solution exists. If a solution exists, the general solution is typically expressed as a particular solution plus the general solution to the associated homogeneous system.
I begin by checking whether the right-hand side is the zero vector; then I use rank to analyze the solution space. Do not conflate conclusions applicable to one type of system with those for the other.
In the previous article, we learned Gaussian elimination—a powerful and systematic method for solving linear systems. This article explores the two fundamental types of linear systems: homogeneous systems and nonhomogeneous systems. Understanding their structural properties and solution strategies is essential for advancing in linear algebra—and for applying it effectively in artificial intelligence.
1. Homogeneous Systems
Definition
A linear system whose constant terms on the right-hand side are all zero is called a homogeneous system. It can be written in matrix form as:
When comparing homogeneous and nonhomogeneous systems, consider: constant terms, existence of the zero solution, number of free variables, rank, and structure of the general solution.
where is the coefficient matrix, is the vector of unknowns, and is the zero vector.
Example
Consider the following homogeneous system:
This system can be expressed in matrix form as , where:
Solution Properties
The solution set of any homogeneous system always includes the trivial solution . If nonzero solutions exist, they are called nontrivial solutions. Using Gaussian elimination, we can determine the parametric form of the solution set. When the number of free variables exceeds zero, the system admits infinitely many solutions.
Python Example
Below is a NumPy-based example for solving a homogeneous system:
import numpy as np
# Define coefficient matrix A
A = np.array([[2, 3, -1],
[4, 6, -2],
[-1, 1, 2]])
# Solve Ax = 0 using singular value decomposition (SVD)
u, s, vt = np.linalg.svd(A) # Singular value decomposition
# The dimension of the nullspace equals the number of near-zero singular values
rank = np.sum(s > 1e-10) # Count nonzero singular values
null_space_dim = A.shape[1] - rank # Dimension of the nullspace
print(f"Dimension of the solution space for the homogeneous system: {null_space_dim}")
2. Nonhomogeneous Systems
Definition
A linear system whose constant terms on the right-hand side are not all zero is called a nonhomogeneous system, and takes the form:
Read “Homogeneous and Nonhomogeneous Linear Systems” through the lens of scenario, concept, action, and outcome. First align these four dimensions—then revisit the parameters, code, or workflow described in the main text.
where is a nonzero vector.
Example
Consider the following nonhomogeneous system:
Its matrix representation is:
Solution Properties
A nonhomogeneous system may have a unique solution, no solution, or infinitely many solutions—depending on the relationship between the coefficient matrix and the augmented matrix . Gaussian elimination—or other numerical methods—can be used to determine which case applies and to compute solutions when they exist.
Python Example
Below is a NumPy-based example for solving a nonhomogeneous system:
import numpy as np
# Define coefficient matrix A and constant vector b
A = np.array([[2, 3, -1],
[4, 6, -2],
[-1, 1, 2]])
b = np.array([5, 10, 3])
# Solve Ax = b using NumPy's linear algebra solver
x = np.linalg.solve(A, b)
print(f"Solution to the nonhomogeneous system: x = {x}")
After studying “Homogeneous and Nonhomogeneous Linear Systems,” try adapting it to your own scenario. Pay special attention to whether inputs, processing steps, and outputs align coherently.
To apply “Homogeneous and Nonhomogeneous Linear Systems” to your own task, start small: isolate and validate just one critical decision point.
Conclusion
In this article, we introduced the definitions and solution properties of homogeneous and nonhomogeneous linear systems, and demonstrated how to solve them computationally using Python. In the next article, we will explore eigenvalues and eigenvectors—stay tuned!
Continue