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.
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
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