Closed Thread
Results 1 to 6 of 6

Thread: Are arrays sort of like matrices?

  1. #1
    Sionofdarkness is offline Programming Expert
    Join Date
    Jul 2006
    Posts
    383
    Rep Power
    0

    Are arrays sort of like matrices?

    I was looking at an array and it reminded me kind of a matrix. Are arrays a type of matrix? I was just thinking about it and wanted to know for sure.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    dirkfirst is offline Programming Expert
    Join Date
    May 2006
    Posts
    354
    Rep Power
    23
    Yup. Multi-dimensional arrays are even more like a matrix. To think of it in programming think about a chess board. Not sure how many squares are across or up or down but lets say 10.

    You'd make an array like array[10][10] (not sure howto in Java as I don't know java) and each cell would represent a place on the board such as

    A 1 2 3 4 5 6
    B 1 2 3 4 5 6
    C 1 2 3 4 5 6
    D 1 2 3 4 5 6
    E 1 2 3 4 5 6
    ...

    Hence you would get your moves like A3 or E4. Sort of like a spreadsheet in excel.

  4. #3
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    Yes and no. An array is presented visually and referenced much like a matrix. However, it does not have any arithmetic operations, and the way it is stored in a computer's memory is usually as a line, regardless of the number of dimensions. An array can have far more than just 2 dimensions.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  5. #4
    Sionofdarkness is offline Programming Expert
    Join Date
    Jul 2006
    Posts
    383
    Rep Power
    0
    What does an array with more than two dimensions look like? I can't imagine how it could look with more than two.

  6. #5
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143
    You can visuallize a 3d array as being a cube. Above 3 dimensions, it's hard to visuallize, but can be very useful. 4d could be thought of as having several Excel workbooks, each with multiple sheets and each sheet having the 2d grid of cells. 5d could be similar, but multiple computers of multiple workbooks.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  7. #6
    Sionofdarkness is offline Programming Expert
    Join Date
    Jul 2006
    Posts
    383
    Rep Power
    0
    Cool. I'm reviewing some Algebra II right now and I'll go over matrices again.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How do I find product of the matrices?
    By jackson6612 in forum C and C++
    Replies: 1
    Last Post: 06-03-2011, 01:29 PM
  2. Suggestions about large Matrices???
    By jakopo in forum General Programming
    Replies: 10
    Last Post: 03-01-2010, 01:23 AM
  3. Using translation matrices with Java 3D
    By ThemePark in forum Java Help
    Replies: 0
    Last Post: 09-17-2009, 07:16 AM
  4. matrices infinite
    By jwxie518 in forum General Programming
    Replies: 2
    Last Post: 09-14-2009, 07:25 PM
  5. Complicated Sort for multiple arrays
    By Greelmo in forum PHP Development
    Replies: 3
    Last Post: 08-12-2009, 04:17 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts