Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168716
Image: ubuntu2004
x1 = [1.0, 2.0]; x2 = [4.0, 4.0] y1 = [2.0, 6.0]; y2 = [7.0, 2.0] X = Matrix([x1,x2]).transpose() Y = Matrix([y1,y2]).transpose() show(X) show(Y)
\left(1.000000000000004.000000000000002.000000000000004.00000000000000\begin{array}{rr} 1.00000000000000 & 4.00000000000000 \\ 2.00000000000000 & 4.00000000000000 \end{array}\right)
\left(2.000000000000007.000000000000006.000000000000002.00000000000000\begin{array}{rr} 2.00000000000000 & 7.00000000000000 \\ 6.00000000000000 & 2.00000000000000 \end{array}\right)
A = Y*X.inverse() show(A)
\left(1.500000000000000.2500000000000005.000000000000005.50000000000000\begin{array}{rr} 1.50000000000000 & 0.250000000000000 \\ -5.00000000000000 & 5.50000000000000 \end{array}\right)
show(A*x1 - y1) show(A*x2 - y2)
\left(0.000000000000000,0.000000000000000\right)
\left(0.000000000000000,0.000000000000000\right)