Matrices Paper: Problem Modeling & C++ Solutions

In summary, the conversation suggests using matrices as a model to explain a concept in a technical paper. The individual is considering using C++ as a programming language and is seeking guidance on what specific area of mathematics or specific problems to focus on. Suggestions for possible domains include Markov chains and 3D transformations, which could be visually demonstrated using OpenGL. The conversation also touches upon the use of vectors and matrices in these models and the potential for incorporating graphics.
  • #1
chaoseverlasting
1,050
3
Im doing a short technical paper on matrices for my college magazine, and I am looking for some problem I can model. From what I gather, I would be using the problem/model to explain a certain concept of matrices.

I was thinking about using C++ to model it, but don't know what model to choose. Most of the people in my class don't really think much of matrices, as they are supposed to be "easy" with sure shot problems in exams. However, I want to illustrate that matrices are really a group of vectors and a square matrix of order n is actually n vectors bunched together in n dimensional space. Moreover, that the operations we perform on matrices are actually transformations of our original vectors. From what I understand, the n degree square matrix holds n vectors which define something analogous to a plane but in n dimensions.

Im pretty decent in C++ and my professor would be helping me along, but I don't even know where to begin looking. If someone could point out what specific "area" of mathematics/matrices I should look out, or point out specific problems, I would be really grateful. Its got to be a tough problem, something that would be challenging. I am kinda worked up about this.
 
Mathematics news on Phys.org
  • #2
Well, Markov chains are a very important tool for mathematical modeling of processes involving sequential transitions between states in which alternatives are chosen with various probabilities. A clunky example: states = raining, sunny, overcast. If it is raining today, it will be raining, sunny,overcast tomorrow with probabilities 0.2, 0.3, 0.5, and so on. This is a Markov chain with a 3x3 transition matrix (operator) and using the theory you can compute all kinds of fun probabilities. The vectors you transform under this operator give probability measures on the three states, and typically you might have a vector which serves as an attractor (this would be a special case of an ergodic process). You could read about the theory in a textbook like Kemeny, Mirkil, Snell, and Thompson, Finite Mathematical Structures, and then write a C program to compare theoretical results with simulations. (This would really be a test of the pseudorandom number generator called by your C program, of course, not a comparison of "theory" and "experiment"!)
 
  • #3
Typically C++ uses "object-oriented" program- am I correct in assuming you would do that?

Sounds to me like what you want to do is define a "vector" made up of an array of numbers, then define a "matrix" as an array of "vectors". I think it would be best to think of the vectors as the columns of the matrix but they could be rows if you prefer that. If you are using "objects" (classes in C++) you might want to define functions that would allow you to access both columns and rows of a matrix as vectors.
 
  • #4
Another reason why Markov chain transition matrices would be a natural example to play with.
 
  • #5
Another possible domain to model can be 3D transformations, as used in computer graphics. If you ever want to learn OpenGL, this practice might turn out to be of good value.

You can google for yourself, or give a look to this page, for example:
http://www.mactech.com/articles/mactech/Vol.15/15.06/3DGraphicEngineEssentials/index.html
(The content of this page is rather long, but it would be enough to read the first 20% of it, before the code-writing frenzy of the remaining 80%).
 
  • #6
HallsofIvy said:
Typically C++ uses "object-oriented" program- am I correct in assuming you would do that?

Sounds to me like what you want to do is define a "vector" made up of an array of numbers, then define a "matrix" as an array of "vectors". I think it would be best to think of the vectors as the columns of the matrix but they could be rows if you prefer that. If you are using "objects" (classes in C++) you might want to define functions that would allow you to access both columns and rows of a matrix as vectors.

Yeah. I am pretty good at oops. I mean, I don't think the programming would be a problem. I've done several mathematics/programming problems from projecteuler.net, so I am not too worried about that part.

Dodo said:
Another possible domain to model can be 3D transformations, as used in computer graphics. If you ever want to learn OpenGL, this practice might turn out to be of good value.

You can google for yourself, or give a look to this page, for example:
http://www.mactech.com/articles/mactech/Vol.15/15.06/3DGraphicEngineEssentials/index.html
(The content of this page is rather long, but it would be enough to read the first 20% of it, before the code-writing frenzy of the remaining 80%).

I was thinking about that. To do show it graphically would really drive the point home. I think I'll learn enough OpenGL to work this problem out, I was thinking of getting into it in any case.

Chris Hillman said:
Well, Markov chains are a very important tool for mathematical modeling of processes involving sequential transitions between states in which alternatives are chosen with various probabilities. A clunky example: states = raining, sunny, overcast. If it is raining today, it will be raining, sunny,overcast tomorrow with probabilities 0.2, 0.3, 0.5, and so on. This is a Markov chain with a 3x3 transition matrix (operator) and using the theory you can compute all kinds of fun probabilities. The vectors you transform under this operator give probability measures on the three states, and typically you might have a vector which serves as an attractor (this would be a special case of an ergodic process). You could read about the theory in a textbook like Kemeny, Mirkil, Snell, and Thompson, Finite Mathematical Structures, and then write a C program to compare theoretical results with simulations. (This would really be a test of the pseudorandom number generator called by your C program, of course, not a comparison of "theory" and "experiment"!)

Could I use graphics in this somehow? What exactly is the problem really? Ill read the theory on the net though, don't think I can get those books here though... I am not sure if our library will have them...
 
  • #7
Here's a [-nother] pitch for http://vpython.org , which uses Numpy/Numeric, a powerful matrix library with matlab-type syntax, to support VPython's real-time 3D graphics. [All this, as well as Python, is free and open source.]

More applications for matrices along the lines of your property is:

- using the determinant to check if three points on a plane are collinear.
- (similar to above) writing the equation of a line, given two points on it.
http://www.ping.be/~ping1339/stels2.htm

- physics applications involving the cross-product

- given a graph (composed of vertices and edges), construct the adjacency matrix and deduce graph-theoretic properties from algebraic operations on the matrix
http://en.wikipedia.org/wiki/Modified_adjacency_matrix
- (related to above) finite difference approaches to solving differential equations
http://webphysics.davidson.edu/Faculty/wc/WaveHTML/node12.html

connecting some of the suggestions given thus far...
http://www.mathworks.com/company/newsletters/news_notes/clevescorner/oct02_cleve.html
 
Last edited by a moderator:
  • #8
chaoseverlasting said:
Ill read the theory on the net though, don't think I can get those books here though... I am not sure if our library will have them...

No, no, no, don't do that. (You can search for some of my posts on the inadequacies of Wikipedia if you don't realize why this would be a bad idea.) There are plenty of good books which will give you the information you need, but the whole point, I think, is to get you to study a book (or at least a chapter in a book).

Another book which covers Markov chains quite well (and which will be useful in all your future work, so you should obtain a copy anyway) is Berman, Non-negative Matrices.
 
  • #9
chaoseverlasting said:
However, I want to illustrate that matrices are really a group of vectors and a square matrix of order n is actually n vectors bunched together in n dimensional space. Moreover, that the operations we perform on matrices are actually transformations of our original vectors.
What you could try is a visualisation of a 3x3 matrix as a parallelepiped. Then show how the determinant formula arises by successive parallel translations of the vectors which turn the parallelepiped into a rectangular solid, whose volume is just three multiplications. The determinant is the volume of the parallelepiped, but I have never seen a fully geometric derivation of it in this way.
 
  • #10
ObsessiveMathsFreak said:
What you could try is a visualisation of a 3x3 matrix as a parallelepiped. Then show how the determinant formula arises by successive parallel translations of the vectors which turn the parallelepiped into a rectangular solid, whose volume is just three multiplications. The determinant is the volume of the parallelepiped, but I have never seen a fully geometric derivation of it in this way.

I know how to derive the volume of a parallelepiped using vectors and proving that equal to the scalar triple product and the determinant, is this what you mean? Perhaps I could show this graphically?
 
  • #11
http://www.mathworks.com/company/new...t02_cleve.html

Wow. That was really something. I think I am going to try and use that somehow.
 
Last edited by a moderator:

FAQ: Matrices Paper: Problem Modeling & C++ Solutions

What is a matrix?

A matrix is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns. It is used to represent mathematical and physical quantities for problem solving and data analysis.

Why are matrices important in problem modeling?

Matrices are important in problem modeling because they allow us to organize and manipulate complex data into a structured format. This makes it easier to analyze and solve problems in various fields such as mathematics, science, engineering, and computer science.

How are matrices used in C++ solutions?

In C++, matrices can be represented using multidimensional arrays or vectors. They can be used for various operations such as addition, subtraction, multiplication, and solving systems of linear equations. Matrices are also useful for creating data structures like graphs and networks.

What are some common applications of matrices in real-world problems?

Matrices have a wide range of applications in real-world problems, such as image and signal processing, data compression, optimization, and machine learning. They are also used in economics, finance, and business for financial analysis, risk management, and forecasting.

Are there any limitations to using matrices in problem modeling?

While matrices are powerful tools for problem modeling, they do have some limitations. For example, the size of a matrix can impact the time and memory required for computations. Also, not all problems can be represented using matrices, and some may require alternative approaches.

Similar threads

Back
Top