Archived

This topic is now archived and is closed to further replies.

ManaStone

How do I read matrices?

Recommended Posts

In the Matrix: 1, 2 ,3 4, 5, 6 7, 8, 9 How I understand it, The Element IJ is 1. But I thought the first column was I, the Second column was J and the third Column was K. If the IJ element is 1 though, then the first column would have to be J. Could somebody please identify for me what each column and row element is on that matrix?

Share this post


Link to post
Share on other sites
Generally rows and columns are indexed using numbers (from 1 and upwards), not letters. So in your matrix the item ai,j = 1 for i = j = 1. The item a1,2 = 2, and so on.

When an item is indexed by a letter that letter is usually a variable. For example:

A square matrix A with elements ai,j such that
ai,j = 0 when i != j and
ai,j = 1 when i = j
is an identity matrix.

Share this post


Link to post
Share on other sites
In a book I have, it describes how to put a (n x (n+1) matrix in reduced form. I have no idea which variables it is referencing. This is how it describes the operation:

A Set row i equal to 1.
B. Set the column j equal to 1. We will loop through columns 1 to n.
C. Find the first row k with k>= i such that Mkj != 0. If no such row exists, then skip to step H.
D. If k != i, then exchange rows k and i using elementary row option(a) under definition 2.3
E. Multiply row i by 1/Mij. This sets (I,j) entry of M to one using elementary row operation (b)
F. For each row r, where i<=r<=n and r!=i, add –Mrj times row I to row r. This step clears each entry above and below row I in column j to zero using elementary row operation (c).
G Increment i.
H if j < n, increment j and loop to step C.

The elementary row option’s aren’t really important right now. How do I know which rows and columns it’s talking about when it mentions j, k, and i ?


[edited by - Manastone on July 27, 2002 3:33:53 PM]

Share this post


Link to post
Share on other sites
I know you weren''t asking about the identity matrix, that was just a simple example to show how variables are used as matrix indices.

The algorithm you gave is iterative. In the first iteration i = 1 and j = 1 (as the first two steps state). Then, depending on the values in the matrix, i and j will be incremented (in steps G and H respectively). The algorithm states pretty clearly what each variable is (e.g. i and k are row indices, j is a column index, etc.)
quote:

How do I know which rows and columns it’s talking about when it mentions j, k, and i ?


That depends on which iteration of the algorithm you''re in. i, j and k will have different values in different iterations.

If your book has a more informal description of how to reduce a matrix, then read it first and look at any examples. It''s probably easier to do the reduction ''by hand'' instead of following the algorithm slavishly, and once you know what the algorithm is meant to achieve it should be easier to figure out what all the indexes mean and how the algorithm works.

It is also a pretty good idea to write a matrix on paper and apply the algorithm on it step by step and write down the values of i, j, k etc. as you go along.

Share this post


Link to post
Share on other sites
Ok, thanks, I think I understand.

One other thing, On another part of the book it talks about an entire row being greater than another. How would you determine that? Would you just add up all of the elements in the rows and see which sum is greater?

Share this post


Link to post
Share on other sites
That''s partly up to the definition of the book: A row (or a column) of any matrix is a vector. So the question is when is one vector greater than the other?

Asking DX7 the answer is: Once every component of one is greater than the corresponding component in the second

Asking most books the answer is: Compute the length (the norm) and see which is greater.

By the way your way (add up the components) is just another norm applicable to vectors.

So your book better clarifies what it means by ''greater''. If it doesn''t I''d assume length comparision. Otherwise it is possible for both not to be the greater

---------------------------
I may be getting older, but I refuse to grow up

Share this post


Link to post
Share on other sites