Row-echelon form of a matrix

This is a discussion on Row-echelon form of a matrix within the C++ Programming forums, part of the General Programming Boards category; If any of you know what it means for a matrix to be in row-echelon form, I'm trying to create ...

  1. #1
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753

    Row-echelon form of a matrix

    If any of you know what it means for a matrix to be in row-echelon form, I'm trying to create some code to check if a matrix is in that form, and if not put it in that form. Any ideas?

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    What is the use of Row-Echelon form, Leeman? Is there one, or are you trying to make a program to do your math homework? Just curious.
    Away.

  4. #4
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    Well, it's going to be a program that solves systems of equations. Yes, for my homework.

  5. #5
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    What I mean by "for my homework" is pre-calc homework lol. Not programming homework.

  6. #6
    Registered User
    Join Date
    Jan 2003
    Posts
    16
    If all you want it for is your homework then do you have a graphing calculator. I know the TI-86 and TI-89 both can do what you ask. I own both and find the TI-86 easier to use when working with matrices.

    James

  7. #7
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753
    Of course I could just do it with my calculator. Much more fun to make a program though.

  8. #8
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    reduced-echelon form:

    1 x y
    0 1 z
    0 0 1

    Code:
    // begin program
    
    int matrix[3][3];  // to hold matrix
    bool echelon=TRUE;
    
    // fill matrix in here
    
    if(matrix[0][0]!=1 ||
       matrix[1][0]!=0 ||
       matrix[1][1]!=1 ||
       matrix[2][0]!=0 ||
       matrix[2][1]!=0 ||
       matrix[2][2]!=1)
          echelon=FALSE;
    
    if(ecelon)
       cout>>"echelon";
    else
       cout>>"not ecelon";
    
    // end program
    row-echelon form:

    x y z
    a b c
    0 0 0

    Code:
    // begin program
    
    int i;
    int matrix[3][3];  // to hold matrix
    bool echelon=TRUE;
    
    // fill matrix in here
    
    for(i=0;i<3;i++)
    {
       if(matrix[2][i]!=0)
          echelon=FALSE;
    }
    
    if(ecelon)
       cout>>"echelon";
    else
       cout>>"not ecelon";
    
    // end program
    i'm not doing all your homework for you... just fill in the cout in the 'else' with code to put it in the lowest form if it's not already... but good luck with that...
    Last edited by major_small; 05-17-2003 at 10:08 PM.
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C program - inverse of a matrix
    By chaugh in forum C Programming
    Replies: 4
    Last Post: 01-18-2010, 11:00 PM
  2. Matrix Help
    By HelpmeMark in forum C++ Programming
    Replies: 27
    Last Post: 03-06-2008, 05:57 PM
  3. Animation not working....
    By aquinn in forum C Programming
    Replies: 7
    Last Post: 02-19-2005, 05:37 AM
  4. Is there a bug in this part of my algorithm for connect 4?
    By Nutshell in forum Game Programming
    Replies: 8
    Last Post: 04-28-2002, 02:58 AM
  5. Help!! Tips on Matrix Calculator Program please!
    By skanxalot in forum C++ Programming
    Replies: 12
    Last Post: 03-11-2002, 11:26 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21