MathGroup Archive 2006

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

Search the Archive

Re: Can't multiply non-square matrices.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg64622] Re: Can't multiply non-square matrices.
  • From: bghiggins at ucdavis.edu
  • Date: Fri, 24 Feb 2006 00:18:18 -0500 (EST)
  • References: <dthgr4$n74$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Chris,

A matrice defined in a typical Linear algebra textbook is in terms of
rows and columns. Thus a 3-row by 2-column matrix times a 2-row by
1-column matrix yields a 3-row by 1-column matrix. In Mathematica this
is done as follows:

Here is my 3-row by 2-column matrix:

mat32={{a1, b1}, {a2, b2}, {a3, b3}}

Here is my 2-row by 1-column matrix:

mat21={c1, c2}

And the multiplication is then:

mat32.mat21

{a1 c1 + b1 c2, a2 c1 + b2 c2, a3 c1 + b3 c2}

which is a 3-row by 1-column matrix.

Note a row vector and column vector (as defined in Linear algebra
texts) are treated the same in Mathematica.

Cheers,

Brian


  • Prev by Date: Re: Increment and AddTo
  • Next by Date: Re: finding the position of a pattern in list
  • Previous by thread: Re: Can't multiply non-square matrices.
  • Next by thread: Counting the number of paths in a network