color(blue)("Using Gauss Jordon elimination")
" "color(white)(.)xcolor(white)(.)ycolor(white)(.)"answer"
" "[[1,3,"|",11],[1,4,"|",14]]
" "Row2-Row1
" "darr
" "[[1,3,"|",11],[0,1,"|",3]]
" "Row1-3(Row2)
" "darr
" "[[1,0,"|",2],[0,1,"|",3]]" "larr [[x],[y]]
color(white)(.)
=>[[1,0],[0,1]] color(white)(.)[[x],[y]] = [[2],[3]]
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
color(blue)("Using Linear Algebra")
A=[[1,3],[1,4]]
color(white)(.)
X=[[x],[y]]
B=[[11],[14]]
=>AX=B
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
color(brown)("Consider the Algebra method of determining "x)
Given:" "3x=4
Divide both side by 3 -> 1/3xx3x=1/3xx4
We multiply the 3 by 3 inverse to turn the coefficient of x into 1
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
color(brown)("Using the Algebra method shown above")
Multiply both sides by A" inverse. written as "color(blue)(A^(-))
color(brown)(=>color(blue)(A^(-))AX" "=" "color(blue)(A^(-))B)
=>X=A^(-)B ...................................Equation(1)
Checked in Maple:
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
color(blue)("Determine "A^(-))
color(brown)("Method 1")
Write the original matrix as:
" "[[1,3,"|",1,0],[1,4,"|",0,1]]
And conduct a Gauss Jordon elimination on the LHS
" "Row2-Row1
" "darr
" "[[1,3,"|",1,0],[0,1,"|",-1,1]]
" "Row1-3(Row2)
" "darr
" "[[1,0,"|",4,-3],[0,1,"|",-1,1]] => A^(-)=[[4,-3],[-1,1]]
,.....................................................................................
color(brown)("Method 2 - Shortcut approach")
Multiply a modified version of [[1,3],[1,4]] by its inverted determinant.
For [[a,b],[c,d]] the determinant is ab-cd
and the modified matrix is [[d,-b],[-c,a]]
D=(1xx4)-(1xx3)=1
Thus A^(-)= 1xx[[4,-3],[-1,1]]
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
color(blue)("Finish the calculation for Equation(1)")
=>X=A^(-)B ...................................Equation(1)
[[4,-3],[-1,1]] [[11],[14]] = [[2],[3]]