MathGroup Archive 2006

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

Search the Archive

Re: adding matrices

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65784] Re: [mg65755] adding matrices
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 17 Apr 2006 02:28:42 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Works fine on my system

$Version

5.2 for Mac OS X (June 20, 2005)

m=Array[a,{3,3}];

p=Array[b,{3,3}];

m-p

{{a[1, 1] - b[1, 1], a[1, 2] - b[1, 2], a[1, 3] - b[1, 3]}, 
  {a[2, 1] - b[2, 1], a[2, 2] - b[2, 2], a[2, 3] - b[2, 3]}, 
  {a[3, 1] - b[3, 1], a[3, 2] - b[3, 2], a[3, 3] - b[3, 3]}}


Bob Hanlon

> 
> From: francis hu7xley <ac7220 at wayne.edu>
To: mathgroup at smc.vnet.net
> Subject: [mg65784] [mg65755] adding matrices
> 
> [This post has been delayed due to email problems - moderator]
> 
> 
> am fairly new to mathematica. simply want to add two 3x3
> matrices together(actually, subtract). if they are called
> m and p, if i type m-p, mathematica treats the second matrix p as a scalar 
and subtracts that entire 3x3 matrix p from each entry of m. the help 
contents do not seem to address this issue!!! there must be a simple way of 
doing this??
> 
> thanks in advance for any help
> 
> 


  • Prev by Date: Re: Beginner--Programming Problem with "if"
  • Next by Date: Re: Plot3D: plot does not display when PlotPoints different from 25. Mathematica 5.2
  • Previous by thread: Re: adding matrices
  • Next by thread: Matrix rows