I have a matrix of the form:
matrix ={{a,b},{10*a,10*b}}.
I want to evaluate this matrix for a set of values. For example:
list = {{1,2},{3,4},{5,6},{7,8},{9,10}},
where each sublist has the values of $a$ and $b$ respectively. How would I go about evaluating the matrix at the values in the list?
Edit:
More specifically, I have a list of the form:
OptimalPoints = {
{
2.2575422669022256316146199310035044964832661776461`15.*^-8,
1.57079639622776237973336943808513436304`15.
},
{
6.5030057578379460133211810893852417847654553996698`15.*^-8,
1.57079630003754406967047630250839359743`15.
},
{
0,
1.57079625737764823615943901490196281871`15.
}
}
and the matrix is derived from the code:
J = 1;
Clear[ψ]
ψ[α_, χ_] := Exp[I α]*Tan[χ/2];
newcoherentstate[α_, χ_, m_] := ((ψ[α, χ])/(1 + ψ[α, χ]*
Simplify[
Conjugate[ψ[α, χ]],
Assumptions -> {Element[α, Reals], Element[χ, Reals]}
]))^(J) *(ψ[α, χ])^(m)*Sqrt[Binomial[2 J, J + m]];
TempNewMatrix [α_, χ_] := Simplify[
Table[
newcoherentstate[α, χ, m],
{m, J, -J, -1}
],
Assumptions -> {Element[α, Reals], Element[χ, Reals]}
];
NewMatrix [α_, χ_] := ArrayReshape[TempNewMatrix [α, χ], {2*J + 1, 1}];
NewMatrix1[α_, χ_] := ArrayReshape[NewMatrix[α, χ], {1, 2*J + 1}]
NewMatrixC[α_, χ_] := Simplify[
Conjugate[NewMatrix1[α, χ]],
Assumptions ->{Element[α, Reals], Element[χ, Reals]}
];
NewProjector[α_, χ_] = Flatten[{NewMatrix[α, χ] .NewMatrixC[α, χ]}, 1];
When I run,
{{#1, #2}, NewProjector[α, χ]} & @@@
OptimalPoints // MatrixForm
I don't get the desired list of matrices evaluated at points in the list optimal points
matrix /. Thread[{a, b} -> #] & /@ list
. $\endgroup$