MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Matrices as operators

Define a function

rMatrix = {{Cos[#], -Sin[#]}, {Sin[#], Cos[#]}} &;


{{Cos[t], -Sin[t]}, {Sin[t], Cos[t]}}

or just use the built-in function


{{Cos[t], -Sin[t]}, {Sin[t], Cos[t]}}

% == %%


Bob Hanlon

On Sun, Nov 20, 2011 at 5:34 AM, Chris Young <cy56 at> wrote:
> I'd like to be able to abbreviate matrices such as rotation matrices so
> that I don't have to repeat the argument. This way I can pass in more
> complicated arguments and it also shows the structure of the
> transformation more clearly.
> Through[( {
>    {Cos, -Sin},
>    {Sin, Cos}
>   } )[=E8]]
> will get me partway there:
> Out: {{Cos, -Sin}[=E8], {Sin, Cos}[=E8]}
> I have to apply Thread and Through again to finally get what I want:
> In: Thread[Through[{{Cos, -Sin}[=E8], {Sin, Cos}[=E8]}]]
> Out: {{Cos[=E8], (-Sin)[=E8]}, {Sin[=E8], Cos[=E8]}}
> Is there a shortcut way to do this all in one step?
> Thanks very much for any help.
> Chris Young
> cy56 at

  • Prev by Date: Re: Scaling Fractions in Math Typesetting
  • Next by Date: Re: Timing graphics in the real world
  • Previous by thread: Matrices as operators
  • Next by thread: Re: Matrices as operators