Guozhen AIGlobal AI field notes and model intelligence

English translation

Define coefficient matrix and constant vector

Published:

Category: Linear Algebra for Beginners

Read time: 4 min

Reads: 0

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

Concept Map: Definition of Linear Equations

A linear equation describes a constraint—on a line, a plane, or in higher-dimensional space. When multiple such constraints are combined, they form a system of equations.

Checklist: Definition of Linear Equations

I first check whether unknown variables appear only to the first power. If any products, squares, or nonlinear functions (e.g., sin, log, exp) appear, the equation is not linear.

Before diving deeper into systems of linear equations, we must first clarify what constitutes a linear equation. One of the most fundamental concepts in mathematics, linear equations find widespread application across engineering, economics, computer science—and especially in artificial intelligence–related tasks, where a solid understanding is essential.

The Form of a Linear Equation

The standard form of a linear equation is:

Decision Card: Identifying Linear Equations

To determine whether an equation is linear:

  1. Verify that all unknowns appear only to the first power;
  2. Examine the coefficient matrix, constant vector, and number of solutions.
a1x1+a2x2++anxn=ba_1 x_1 + a_2 x_2 + \ldots + a_n x_n = b

Here, x1,x2,,xnx_1, x_2, \ldots, x_n are the unknown variables, a1,a2,,ana_1, a_2, \ldots, a_n are real (or complex) coefficients, and bb is a constant term. Crucially, every linear equation expresses a linear combination of its unknowns.

Example

Consider the simple linear equation:

2x+3y=62x + 3y = 6

In this equation:

  • Coefficients: a1=2a_1 = 2, a2=3a_2 = 3
  • Constant term: b=6b = 6
  • Unknowns: xx and yy

This equation describes a straight line in the plane.

Systems of Linear Equations

Multiple linear equations can be grouped into a system of linear equations. Such a system is typically expressed compactly in matrix form. For instance, consider these two equations:

  1. 2x+3y=62x + 3y = 6
  2. 4xy=54x - y = 5

We can write them as:

[2341][xy]=[65]\begin{bmatrix} 2 & 3 \\ 4 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 6 \\ 5 \end{bmatrix}

Here, [2341]\begin{bmatrix} 2 & 3 \\ 4 & -1 \end{bmatrix} is the coefficient matrix, [xy]\begin{bmatrix} x \\ y \end{bmatrix} is the unknown vector, and [65]\begin{bmatrix} 6 \\ 5 \end{bmatrix} is the constant vector.

Solutions to Linear Equations

A solution to a linear equation is a set of values for the variables that satisfies the equation. For a single linear equation in nn variables, the solution set is either:

  • A unique solution (in special cases with additional constraints), or
  • An infinite set of solutions (typically forming a line, plane, or hyperplane).

For example, solving 2x+3y=62x + 3y = 6 using substitution or elimination yields many valid solutions:

Linear Algebra Reading Roadmap Card

When reading “Definition of Linear Equations”, start by reviewing the accompanying figures—tasks, core concepts, practice prompts, and decision points—before returning to the main text for details. This helps you quickly assess which real-world scenarios this material applies to.

  • If y=0y = 0, then 2x=62x = 6, so x=3x = 3: one solution is (3,0)(3, 0).
  • If x=0x = 0, then 3y=63y = 6, so y=2y = 2: another solution is (0,2)(0, 2).

These points lie on the same line—the geometric representation of all solutions.

Applications of Linear Equations

In artificial intelligence, linear equations underpin numerous techniques—including regression analysis and model training. In linear regression, for example, we minimize a loss function to find the best-fitting line; at its core, this optimization reduces to solving a system of linear equations.

Python Example

In Python, the NumPy library provides efficient tools for solving linear systems. Here’s a minimal working example:

import numpy as np

# Define coefficient matrix and constant vector
A = np.array([[2, 3], [4, -1]])
B = np.array([6, 5])

# Solve the linear system Ax = B
solution = np.linalg.solve(A, B)

print("Solution:", solution)

Running this code yields the unique solution to the two-equation system. np.linalg.solve() is a robust, numerically stable routine for solving square, nonsingular linear systems.

Application Recap Card: Definition of Linear Equations

Having read “Definition of Linear Equations”, consolidate your understanding into a recap table: first articulate the central thread, then validate it with a small concrete task.

Application Check Card: Definition of Linear Equations

After finishing “Definition of Linear Equations”, try walking through a small example end-to-end. Then reflect: which steps can you now perform independently?

Summary

In this tutorial, we defined linear equations, explored their standard algebraic and matrix forms, and discussed the nature of their solutions. Grasping linear equations is foundational—not only for analyzing systems of equations but also for mastering advanced algorithms like Gaussian elimination. In the next chapter, we’ll dive into Gaussian elimination as an efficient method for solving linear systems. 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...