[Libre-soc-dev] complex numbers as matrices
Jacob Lifshay
programmerjake at gmail.com
Sat Jun 26 00:30:01 BST 2021
On Fri, Jun 25, 2021 at 2:55 PM Luke Kenneth Casson Leighton
<lkcl at lkcl.net> wrote:
>
> On 6/25/21, Hendrik Boom <hendrik at topoi.pooq.com> wrote:
>
> > Representing a complex number as a matrix makes it into a 2x2 matrix of
> > reals,
> > That means more data manipulation for the same complex number.
>
> double the amount, right?
>
> however what if you had A as a 2x2 matrix (ab) and B as a 1x2 vector (ef)?
>
> (a -b (e
> b a) f)
>
> result is
> (ae - bf)
> (eb + af)
>
> where the original was....
>
> A = a + bj
> B = e + fj
>
> so A*B = ae - bf + (af + be)j
>
> and yes it's the same! awesome.
Yup, it has the same arithmetic ops, *however* it takes twice as much
storage for A and you'd have to constantly regenerate the matrix A
from a vec2. efficient? not likely.
Jacob
More information about the Libre-soc-dev
mailing list