How to put Wolfram|Alpha output in a Block

Hi Everyone,

I am using Wolfram|Alpha inside a Mathematica notebook for getting a permutation matrix for a particular order. I want to use output of this inside a Block but its not happening.

Hi Aditya

MatrixForm is not computable. Also avoid use of symbol names starting with an uppercase letter, WL built-in symbols use that convention. And using %, especially in a function definition is asking for trouble.

m = WolframAlpha[
   "matrix of the permutation (4 3 2)(1)", {{"PermutationMatrix", 1}, 
    "ComputableData"}] // ReleaseHold

my[r_] := Block[{a, b}, a = m; b = a . r . a\[Transpose]]; (* Why do you need Block here? *)

my[{{1/2, 0, 0, -(1/2)}, {-(1/2), 1, 0, -(1/2)}, {-(1/2), 0, 1, -(1/2)}, {-(1/2), 0, 0, 1/2}}]
(* {{1/2, -(1/2), 0, 0}, {-(1/2), 1/2, 0, 0}, {-(1/2), -(1/2), 1, 0}, {-(1/2), -(1/2), 0, 1}} *)