I have data set, say, {${x_i, y_i}$} where $i$ varies from $1$ to $n$. Now, how can I construct the matrices

$M_i=\{\{1,x_i,x_i\},\{\ x_i,1,y_i\},\{x_i, y_i, 1 \}\}$

and perform the following operations ?

$\{V3_{i}, V2_{i}, V1_{i}\} = Eigenvectors[M_i]$

$R = Transpose[{V1_{i}, V2_{i}, V3_{i}}]$


You can pretty much do as you already have.

Transpose@*Reverse@*Eigenvectors@*({{1, #1, #1}, {#1, 1, #2}, {#1, #2, 1}} &) @@@ data

For example with data = (SeedRandom["Homotopy Theory is cool"]; RandomReal[{0, 1}, {100, 2}];), the above gives (after a Short[Chop@#, 2] &)


  • 3
    $\begingroup$ I got my coffee this morning with non-dairy neutrinos. Tasted just as good, and there was no extra charge... $\endgroup$ Aug 11 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.