[Date Index]
[Thread Index]
[Author Index]
Re: Matrix
*To*: mathgroup at smc.vnet.net
*Subject*: [mg34842] Re: [mg34829] Matrix
*From*: Murray Eisenberg <murraye at attbi.com>
*Date*: Sun, 9 Jun 2002 05:10:13 -0400 (EDT)
*Organization*: Mathematics & Statistics, Univ. of Mass./Amherst
*References*: <200206080922.FAA26195@smc.vnet.net>
*Reply-to*: murray at math.umass.edu
*Sender*: owner-wri-mathgroup at wolfram.com
First of all, your syntax for entry of a matrix (i.e., list of
equal-length lists) is wrong -- lists, hence matrices, entered in linear
form use braces (i.e., "curly brackets") rather than parentheses:
A = {{1, 1}, {1, 0}};
Common number-at-a-time operations such as addition and multiplication
automatically operate entrywise on such lists, which is why you
correctly report that A * A is the same as A:
A * A
{{1, 1}, {1, 0}}
If you want matrix multiplication, you have to use a different function
to indicate that -- Mathematica cannot read your mind! -- like this:
A . A
{{2, 1}, {1, 1}}
This is VERY basic, so it seems you really need to read some of the very
basic documentation, e.g., Section 1.8.3, "Vectors and Matrices", of The
Mathematica Book, either in the Help Browser or the printed form of the
book.
Pirc wrote:
>
> If matrix A = ((1, 1) (1, 0)), Mathematica reports A * A as A.
>
> Shouldn't A * A = ((2, 1) (1, 0))?
>
> What am I missing?
>
> Thanks.
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street
Amherst, MA 01375
**References**:
**Matrix**
*From:* pirc_defense@hotmail.com (Pirc)
Prev by Date:
**Re: Matrix**
Next by Date:
**RE: Matrix**
Previous by thread:
**Matrix**
Next by thread:
**Re: Matrix**
| |