Maths Formulae Matrices Equation In Matrix Form

Equation in Matrix Form – Representation and Solving

Represent systems of linear equations in matrix form and learn how to solve them using inverse and row-reduction methods...
🔑

Definition of Equation in Matrix Form

A system of linear equations can be expressed compactly in matrix form as \( AX = B \). This representation organizes the coefficients, variables, and constants of the equations into three distinct matrices.

\[ AX = B \]
General Matrix Form

In this form:

  • A is the coefficient matrix, containing the coefficients of the variables.
  • X is the variable matrix (a column vector), containing the unknown variables.
  • B is the constant matrix (a column vector), containing the constant terms from the right-hand side of the equations.
\[ \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = \begin{pmatrix} b_1 \\ b_2 \end{pmatrix} \]
Example for a 2x2 System
SymbolDescription
\[ A \]Coefficient Matrix - Contains all coefficients of variables in the system
\[ X \]Variable Vector - Column vector containing all unknown variables
\[ B \]Constant Vector - Column vector containing constants from the right side of equations
\[ a_{ij} \]Coefficient Element - Coefficient of variable j in equation i
\[ A^{-1} \]Inverse Matrix - Exists only when det(A) ≠ 0, used for direct solution
\[ [A|B] \]Augmented Matrix - A and B combined for Gaussian elimination
\[ \text{rank}(A) \]Matrix Rank - Number of linearly independent rows/columns
🔢

Key Formulas and Solution Methods

\[ X = A^{-1}B \]
Solution using Matrix Inverse (if det(A) ≠ 0)
\[ [A|B] \rightarrow [I|X] \]
Solution using Gaussian Elimination (Augmented Matrix)
\[ x_i = \frac{\det(A_i)}{\det(A)} \]
Solution using Cramer's Rule (where Aᵢ is A with column i replaced by B)
\[ \det(A) \neq 0 \]
Condition for a Unique Solution
🏗️

Structural Diagram

System 2x + y = 5 x + 3y = 10 A 2 1 1 3 x x y = b 5 10 𝐀𝐱 = 𝐛 → 𝐱 = A⁻¹𝐛 Solution: x = A⁻¹b (when det A ≠ 0)
Matrix Form Ax = b: a system of linear equations compactly written as coefficient matrix × variable vector = constant vector.

The matrix equation \( AX = B \) represents a system of m linear equations with n variables. The components are structured as follows:

  • A (Coefficient Matrix): An m × n matrix where each row corresponds to an equation and each column corresponds to a variable.
  • X (Variable Vector): An n × 1 column vector listing the unknown variables.
  • B (Constant Vector): An m × 1 column vector listing the constant terms.

The product of the m × n matrix A and the n × 1 vector X results in an m × 1 vector, which must equal the vector B.

Key Properties

Solution Existence (Consistency)

A system \( AX = B \) is consistent (has at least one solution) if and only if the rank of the coefficient matrix A is equal to the rank of the augmented matrix [A|B]. This means the constant vector B must be in the column space of A.

Solution Uniqueness

For a square system (m=n), a unique solution exists if and only if the determinant of the coefficient matrix is non-zero (det(A) ≠ 0). If det(A) = 0, the system has either no solution or infinitely many solutions.

Homogeneous Systems

A system of the form \( AX = 0 \) is called a homogeneous system. It always has the trivial solution \( X = 0 \). Non-trivial solutions exist only if det(A) = 0.

Superposition Principle

If \( X_1 \) is a solution to \( AX = B_1 \) and \( X_2 \) is a solution to \( AX = B_2 \), then for any scalars c₁ and c₂, the vector \( c_1X_1 + c_2X_2 \) is a solution to \( AX = c_1B_1 + c_2B_2 \). This demonstrates the linearity of the system.

🔬

Derivation of Matrix Form

The matrix form \( AX = B \) is derived directly from the definition of matrix multiplication. Consider a simple system of two linear equations with two variables:

\[ \begin{cases} a_{11}x_1 + a_{12}x_2 = b_1 \\ a_{21}x_1 + a_{22}x_2 = b_2 \end{cases} \]

We can group the coefficients, variables, and constants into three separate matrices:

\[ A = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}, \quad X = \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}, \quad B = \begin{pmatrix} b_1 \\ b_2 \end{pmatrix} \]

Now, let's compute the matrix product AX:

\[ AX = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} = \begin{pmatrix} (a_{11} \cdot x_1) + (a_{12} \cdot x_2) \\ (a_{21} \cdot x_1) + (a_{22} \cdot x_2) \end{pmatrix} \]

By equating this result with the constant matrix B, we reconstruct the original system of equations. Therefore, the compact form \( AX = B \) is equivalent to the original system.

\[ \begin{pmatrix} a_{11}x_1 + a_{12}x_2 \\ a_{21}x_1 + a_{22}x_2 \end{pmatrix} = \begin{pmatrix} b_1 \\ b_2 \end{pmatrix} \]
✍️

Worked Example

Given the system of linear equations:<br>3x + 2y = 7<br>4x - y = 2<br>Write the system in matrix form \( AX = B \) and solve for x and y using the matrix inverse method.
  1. Step 1: Write the system in matrix form. Identify the coefficient matrix A, the variable vector X, and the constant vector B.
  2. \[ A = \begin{pmatrix} 3 & 2 \\ 4 & -1 \end{pmatrix}, \quad X = \begin{pmatrix} x \\ y \end{pmatrix}, \quad B = \begin{pmatrix} 7 \\ 2 \end{pmatrix} \implies \begin{pmatrix} 3 & 2 \\ 4 & -1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 7 \\ 2 \end{pmatrix} \]
  3. Step 2: Find the determinant of A to ensure an inverse exists.
  4. \[ \det(A) = (3)(-1) - (2)(4) = -3 - 8 = -11 \]
  5. Since det(A) ≠ 0, a unique solution exists.
  6. Step 3: Calculate the inverse of A, \( A^{-1} \).
  7. \[ A^{-1} = \frac{1}{\det(A)} \begin{pmatrix} -1 & -2 \\ -4 & 3 \end{pmatrix} = -\frac{1}{11} \begin{pmatrix} -1 & -2 \\ -4 & 3 \end{pmatrix} = \begin{pmatrix} 1/11 & 2/11 \\ 4/11 & -3/11 \end{pmatrix} \]
  8. Step 4: Solve for X using the formula \( X = A^{-1}B \).
  9. \[ X = \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 1/11 & 2/11 \\ 4/11 & -3/11 \end{pmatrix} \begin{pmatrix} 7 \\ 2 \end{pmatrix} = \begin{pmatrix} (1/11)(7) + (2/11)(2) \\ (4/11)(7) + (-3/11)(2) \end{pmatrix} = \begin{pmatrix} (7+4)/11 \\ (28-6)/11 \end{pmatrix} = \begin{pmatrix} 11/11 \\ 22/11 \end{pmatrix} = \begin{pmatrix} 1 \\ 2 \end{pmatrix} \]
The solution is x = 1 and y = 2.
🌍

Applications

Structural Engineering

Engineers use large systems of linear equations in matrix form to model and analyze the forces and stresses in complex structures like bridges, dams, and skyscrapers. This ensures the designs are stable and can withstand various loads.

Electrical Engineering

In circuit analysis, Kirchhoff's laws for current and voltage result in a system of linear equations. Matrix form is used to solve for the unknown currents and voltages in complex circuits with multiple loops and power sources.

Economics and Finance

Economists model market behavior with systems of equations representing supply, demand, and pricing. Matrix algebra helps find equilibrium points. In finance, it is used for portfolio optimization by solving systems that balance risk and return across multiple assets.

Computer Graphics and Robotics

Matrix equations are fundamental to 3D computer graphics for transformations like rotation, scaling, and translation. In robotics, they are used to calculate the positions and movements of robotic arms and joints.

Data Science and Machine Learning

Many machine learning algorithms, such as linear regression, involve solving matrix equations to find the optimal parameters (weights) that best fit a set of data. This is crucial for creating predictive models.

💡

Real-World Examples

An electronics shop sells two types of laptops, Model A and Model B. Model A has 8GB of RAM and a 256GB SSD. Model B has 16GB of RAM and a 512GB SSD. The shop needs to fulfill an order for a total of 20 laptops, requiring a combined total of 224GB of RAM. How many of each model should be prepared?
  1. Let 'a' be the number of Model A laptops and 'b' be the number of Model B laptops.
  2. Set up the system of equations. Equation 1 (Total laptops): a + b = 20. Equation 2 (Total RAM): 8a + 16b = 224.
  3. Write the system in matrix form \(AX = B\):
  4. \[ \begin{pmatrix} 1 & 1 \\ 8 & 16 \end{pmatrix} \begin{pmatrix} a \\ b \end{pmatrix} = \begin{pmatrix} 20 \\ 224 \end{pmatrix} \]
  5. Solve the system. We can use substitution or matrix methods. Using substitution: from eq 1, a = 20 - b. Substitute into eq 2: 8(20 - b) + 16b = 224.
  6. 160 - 8b + 16b = 224 => 8b = 64 => b = 8.
  7. Substitute b back into a = 20 - b, so a = 20 - 8 = 12.
The shop should prepare 12 Model A laptops and 8 Model B laptops.
A farmer is mixing two types of feed, Mix P and Mix Q, for their livestock. Mix P contains 10% protein and 30% corn. Mix Q contains 20% protein and 15% corn. The final mixture must weigh 500 kg and contain exactly 80 kg of protein. How many kilograms of each mix are needed?
  1. Let 'p' be the kg of Mix P and 'q' be the kg of Mix Q.
  2. Set up the equations. Equation 1 (Total weight): p + q = 500. Equation 2 (Total protein): 0.10p + 0.20q = 80.
  3. Write in matrix form \(AX=B\):
  4. \[ \begin{pmatrix} 1 & 1 \\ 0.10 & 0.20 \end{pmatrix} \begin{pmatrix} p \\ q \end{pmatrix} = \begin{pmatrix} 500 \\ 80 \end{pmatrix} \]
  5. Solve using matrix inverse. First, find the determinant: det(A) = (1)(0.20) - (1)(0.10) = 0.1.
  6. Find the inverse: \[ A^{-1} = \frac{1}{0.1} \begin{pmatrix} 0.20 & -1 \\ -0.10 & 1 \end{pmatrix} = 10 \begin{pmatrix} 0.20 & -1 \\ -0.10 & 1 \end{pmatrix} = \begin{pmatrix} 2 & -10 \\ -1 & 10 \end{pmatrix} \]
  7. Calculate X = A⁻¹B:
  8. \[ \begin{pmatrix} p \\ q \end{pmatrix} = \begin{pmatrix} 2 & -10 \\ -1 & 10 \end{pmatrix} \begin{pmatrix} 500 \\ 80 \end{pmatrix} = \begin{pmatrix} 2(500) - 10(80) \\ -1(500) + 10(80) \end{pmatrix} = \begin{pmatrix} 1000 - 800 \\ -500 + 800 \end{pmatrix} = \begin{pmatrix} 200 \\ 300 \end{pmatrix} \]
The farmer needs 200 kg of Mix P and 300 kg of Mix Q.
🏙️

Real-World Scenarios

Circuit Analysis (KVL) R₁ R₂ V RI = V → I = R⁻¹V solves branch currents
Circuit Analysis
Kirchhoff's laws for multi-loop circuits produce Ax = b where A is the resistance matrix, x the unknown currents, and b the voltage sources. SPICE simulators solve this system millions of times per simulation.
Finite Element Analysis F Kd = F (stiffness matrix) d = K⁻¹F — displacements
Structural Engineering
FEA expresses structural mechanics as Kd = F — global stiffness matrix K times displacement vector d equals force vector F. Bridges, aircraft, and skyscrapers are designed by solving this matrix equation.
Traffic Flow Balance x₁ x₂ x₃ x₄ Ax=b — conservation at junctions
Traffic Flow Modelling
At each road junction, inflow = outflow — a conservation law that produces a system Ax = b. Solving it gives traffic flow on every road segment, used in urban transport planning.
Google PageRank Algorithm

The internet can be modeled as a massive system of equations where each webpage's rank is a variable dependent on the ranks of pages linking to it. Google uses sophisticated matrix methods to solve this enormous system, determining the importance and search order of billions of webpages.

Economic Modeling

Economists build input-output models to understand how different sectors of an economy (e.g., manufacturing, agriculture, energy) are interrelated. These models form large matrix equations that can predict how a change in one sector, like a drop in oil prices, will ripple through the entire economy.

GPS Navigation

Your GPS receiver constantly solves systems of linear equations. It receives signals from multiple satellites, each providing an equation relating your unknown position (x, y, z) and time to the satellite's known position. By solving this system in matrix form, the receiver pinpoints your exact location on Earth.

📊

Types and Classification of Systems

Systems of linear equations represented by \( AX=B \) are classified based on the number of solutions they have. This is primarily determined by the properties of the coefficient matrix A and its relationship with the constant vector B.

ConditionSolution TypeDescription
`det(A) ≠ 0` (for square matrices)Unique SolutionThe system is consistent and independent. There is exactly one set of values for the variables that satisfies all equations.
`det(A) = 0` and `rank(A) = rank([A|B])`Infinitely Many SolutionsThe system is consistent and dependent. At least one equation is a linear combination of the others, leading to an infinite number of possible solutions.
`det(A) = 0` and `rank(A) ≠ rank([A|B])`No SolutionThe system is inconsistent. The equations are contradictory, and there is no set of values for the variables that can satisfy all of them simultaneously.

A special case is the Homogeneous System where \( B = 0 \). These systems always have at least one solution, the trivial solution \( X = 0 \). They have non-trivial (infinite) solutions if and only if `det(A) = 0`.

⚠️

Common Mistakes

⚠️ Incorrect Matrix Setup: A common error is incorrectly transcribing the system into matrix form. Ensure coefficients are in the correct rows and columns in matrix A, variables are in the correct order in vector X, and signs are preserved. A single mistake here will lead to a completely wrong solution.
⚠️ Assuming an Inverse Always Exists: Students often try to solve for X using \( A^{-1}B \) without first checking if the inverse exists. You must calculate the determinant of A first. If det(A) = 0, the matrix is singular, has no inverse, and this method cannot be used.
💡 Forgetting Matrix Multiplication Order: The solution is \( X = A^{-1}B \), not \( X = BA^{-1} \). Matrix multiplication is not commutative, so the order is critical. Always pre-multiply B by the inverse of A.
🚀

Study Strategy

1 🧠 Grasp the Core Concepts
  • Clearly define what the coefficient matrix (A), variable vector (x), and constant vector (b) represent in the equation Ax = b.
  • Visualize how matrix multiplication of A and x reconstructs the original system of linear equations.
  • Understand the dimensional requirements: the number of columns in A must match the number of rows in x.
  • Review the 'Types and Classification of Systems' to connect concepts like consistency and unique solutions to the matrix form.
2 🔑 Memorize the Solution Methods
  • Commit the primary solution formula to memory: x = A⁻¹b, where A⁻¹ is the inverse of matrix A.
  • Internalize the condition for a unique solution: the determinant of A must be non-zero (det(A) ≠ 0).
  • Learn the specific formula for calculating the inverse of a 2x2 matrix, as it is a frequent and foundational case.
  • Recall the process of using an augmented matrix [A|b] and row reduction (Gaussian elimination) as an alternative solution method.
3 ✍️ Practice with Worked Examples
  • Follow the provided worked example, performing each calculation yourself to find the inverse A⁻¹ and solve for x.
  • Solve several 2x2 and 3x3 systems by hand, first by finding the inverse and then by using row reduction to compare methods.
  • Practice identifying the common mistake of multiplying in the wrong order (bA⁻¹ instead of A⁻¹b).
  • Verify your solutions by substituting the resulting vector x back into the original matrix equation Ax = b.
4 🌍 Apply to Real-World Scenarios
  • Select a real-world problem from the 'Applications' section, like a network flow or an economics model.
  • Translate the word problem's constraints and relationships into a system of linear equations.
  • Construct the coefficient matrix A, variable vector x, and constant vector b from your system of equations.
  • Solve the matrix equation Ax = b and interpret your solution vector x in the context of the original scenario.
By breaking down complex systems into the simple form Ax = b, you unlock a powerful and systematic approach to problem-solving.

Frequently Asked Questions

×

×