Shape matrix P for ellipse: square roots of eigenvalues and eigenvectors give the semi-axes lengths and directions

P={{6,2},{2,9}}
Eigensystem[P]

RegionPlot[Dot[{x,y}.Inverse[P].{x,y}]≤1,{x,-5,5},{y,-5,5}]

Find smallest ellipse containing polytope with vertices {{0, 0}, {1, 0}, {2, 3}}

Clear[P]

v={{0,0},{1,0},{2,3}}

Length[v]

Array[P,{2,2}]

Array[c,2]

ellipseconstraints=Table[Simplify[Dot[v[[k,;;]]-Array[c,2],Inverse[Array[P,{2,2}]].(v[[k,;;]]-Array[c,2])]]==1,{k,1,Length[v]}]

vars=Catenate[{Flatten[Array[P,{2,2}]],Array[c,2]}]

soln=NMinimize[{P[1,1]+P[2,2],ellipseconstraints,Min[Eigenvalues[Array[P,{2,2}]]]≥0,P[1,2]==P[2,1]},vars]

center=Array[c,2]/.soln[[2]]
P=Array[P,{2,2}]/.soln[[2]]

Show[RegionPlot[Dot[({x,y}-center).Inverse[P].({x,y}-center)]≤1,{x,-2,4},{y,-2,4}],ListPlot[v,PlotStyle->{Red,PointSize[Large]}]]