Finding x,y coordinates where y is largest
MaximalBy[A, Last]
{{-3, 0.523614}}
A[[Ordering[A[[All, -1]], -1]]]
{{-3, 0.523614}}
Note: Ordering
typically is faster than alternatives for large lists.
SeedRandom[1]
a = RandomReal[1, {100000, 2}];
r1 = a[[Ordering[a[[All, -1]], -1]]]; // RepeatedTiming // First
0.0017
r2 = First[SortBy[a, -Last@#&]];// RepeatedTiming// First
0.017
r3 = TakeLargestBy[a, Last,1]; // RepeatedTiming // First
0.039
r4 = MaximalBy[a, Last]; // RepeatedTiming // First
0.065
r5 = First[Sort[a, #1[[2]] > #2[[2]] &]];// RepeatedTiming// First
1.88
r1 == {r2} == r3 == r4 =={r5}
True
First[Sort[A, #1[[2]] > #2[[2]] &]]
{-3, 0.523614}