Linear Systems of Algebraic Equations

This page presents some topics from Linear Algebra needed for construction of solutions to systems of linear algebraic equations and some applications. We use matrices and vectors as essential elements in obtaining and expressing the solutions.

Cramer's Rule

While the following theorem is known as Cramer's rule; actually the Swiss mathematician Gabriel Cramer (1704--1752) is not the author of this statement.

Theorem: Let \( {\bf A}\,{\bf x} = {\bf b}\) be a system of \( n \) equations in \( n \) variables. Let \( {\bf A}_i ,\) for \( 1 \le i \le n ,\) be defined as the \( n \times n \) matrix obtained by replacing the i-th column of A with b. Then, if \( \det {\bf A} \ne 0 ,\) the entries of the unique solution x of \( {\bf A}\,{\bf x} = {\bf b}\) are given by

\[ x_1 = \frac{| {\bf A}_1 |}{| {\bf A} |} , \quad x_2 = \frac{| {\bf A}_2 |}{| {\bf A} |} , \quad \ldots , \quad x_n = \frac{| {\bf A}_n |}{| {\bf A} |} . \]
We demonstrate how Sage can solve the system of algebraic equations using Cramer's rule.
sage: A=matrix(QQ,3,3,[[1,-4,1],[4,-1,2],[2,2,-3]]);A
[ 1 -4 1]
[ 4 -1 2]
[ 2 2 -3] sage: b=vector([6,-1,-20]) sage: B=copy(A)
sage: C=copy(A)
sage: D=copy(A) sage: B[:,0] = b
sage: C[:,1] = b
sage: D[:,2] = b
sage: x1=B.det()/A.det(); x1
-144/55
sage: x2=C.det()/A.det(); x2
-61/55
sage: x3=D.det()/A.det(); x3
46/11

Table Of Contents

Previous topic

Matrix Algebra

Next topic

Systems of linear ODEs