A=(({{5, 10}, {10, 30}})); b = {8,20};
LinearSolve[A,b]

A=(({{5, 10, 30}, {10, 30, 100}, {30, 100, 354}})); b = {8,20,70};
LinearSolve[A,b]

xt=Table[3+n*(0.1),{n,5,18}]
NN=Length[xt]

mu[x_]:=Cos[Exp[2x]]
yt=mu[xt]

Plot[mu[x],{x,xt[[1]],xt[[NN]]}]

(xt^2)

(3.5^2)

xt*yt

(∑_(i=1)^NN)xt[[i]]

(∑_(i=1)^NN)yt[[i]]

(∑_(i=1)^NN)((xt[[i]])^2)

(∑_(i=1)^NN)xt[[i]]*yt[[i]]

-5.396027245211625`

A=(({{NN, (∑_(i=1)^NN)xt[[i]]}, {(∑_(i=1)^NN)xt[[i]], (∑_(i=1)^NN)((xt[[i]])^2)}}))

A//MatrixForm

b = {(∑_(i=1)^NN)yt[[i]], (∑_(i=1)^NN)xt[[i]]*yt[[i]]}

LinearSolve[A,b]

P1[x_]:=0.78429x-3.378

(Sqrt[(∑_(i=1)^NN)(((yt[[i]]-P1[xt[[i]]]))^2)])