Guozhen AIGlobal AI field notes and model intelligence

English translation

Define coefficient matrix A

Published:

Category: Linear Algebra for AI Beginners

Read time: 4 min

Reads: 0

Lesson #14Views are counted together with the original Chinese articleImages are preserved from the source page

Concept Diagram: Homogeneous vs. Nonhomogeneous Systems

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.

Verification Diagram: Homogeneous vs. Nonhomogeneous Systems

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:

Decision Aid: Homogeneous vs. Nonhomogeneous Systems

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.

Ax=0A\mathbf{x} = \mathbf{0}

where AA is the coefficient matrix, x\mathbf{x} is the vector of unknowns, and 0\mathbf{0} is the zero vector.

Example

Consider the following homogeneous system:

2x+3yz=04x+6y2z=0x+y+2z=0\begin{align*} 2x + 3y - z &= 0 \\ 4x + 6y - 2z &= 0 \\ -x + y + 2z &= 0 \end{align*}

This system can be expressed in matrix form as Ax=0A\mathbf{x} = \mathbf{0}, where:

A=(231462112),x=(xyz),0=(000)A = \begin{pmatrix} 2 & 3 & -1 \\ 4 & 6 & -2 \\ -1 & 1 & 2 \end{pmatrix}, \quad \mathbf{x} = \begin{pmatrix} x \\ y \\ z \end{pmatrix}, \quad \mathbf{0} = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}

Solution Properties

The solution set of any homogeneous system always includes the trivial solution x=0\mathbf{x} = \mathbf{0}. 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:

Linear Algebra Reading Map Card

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.

Ax=bA\mathbf{x} = \mathbf{b}

where b\mathbf{b} is a nonzero vector.

Example

Consider the following nonhomogeneous system:

2x+3yz=54x+6y2z=10x+y+2z=3\begin{align*} 2x + 3y - z &= 5 \\ 4x + 6y - 2z &= 10 \\ -x + y + 2z &= 3 \end{align*}

Its matrix representation is:

A=(231462112),x=(xyz),b=(5103)A = \begin{pmatrix} 2 & 3 & -1 \\ 4 & 6 & -2 \\ -1 & 1 & 2 \end{pmatrix}, \quad \mathbf{x} = \begin{pmatrix} x \\ y \\ z \end{pmatrix}, \quad \mathbf{b} = \begin{pmatrix} 5 \\ 10 \\ 3 \end{pmatrix}

Solution Properties

A nonhomogeneous system may have a unique solution, no solution, or infinitely many solutions—depending on the relationship between the coefficient matrix AA and the augmented matrix [Ab][A \mid \mathbf{b}]. 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}")

Application Review Card: Homogeneous and Nonhomogeneous Linear Systems

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.

Application Checklist Card: Homogeneous and Nonhomogeneous Linear Systems

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

Keep reading from here

Browse English site

Reader Messages

Reader messages

Questions, corrections, extra sources, or hands-on results can be left here. No login is required.

Max 800 characters

To reduce spam, each message is checked for length, link count, and posting frequency.

0/800

Messages

0 messages
Loading messages...