MathGroup Archive 2011

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

Search the Archive

Re: Matrices as operators

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123018] Re: Matrices as operators
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Mon, 21 Nov 2011 04:24:35 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201111201034.FAA01071@smc.vnet.net>

Define a function

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

rMatrix[t]

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

or just use the built-in function

RotationMatrix[t]

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

% == %%

True


Bob Hanlon


On Sun, Nov 20, 2011 at 5:34 AM, Chris Young <cy56 at comcast.net> 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 comcast.net
>



  • 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