What is a matrix where to use it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is a matrix where to use it?

What is a matrix, how to use it? Why do I need it, I know that I do not know

25th Aug 2019, 9:06 PM
Ахан
Ахан - avatar
2 Answers
+ 2
Matrices are especially common when dealing with geometry. For example, rotating a point by 30 degrees and then moving it by 2 in the x-direction can be encoded as a single 3x3 matrix. You then multiply a point with that matrix to get your answer. If you are rendering a 3D world you eventually have to get it onto your 2D screen and one way to do it is to do a bunch of matrix operations to flatten the scene to 2D. You can also use them to solve linear equations or do all sorts of statistical things. Matrices are a concept taken from mathematics, so you will encounter them when programming mathematical things. They are surprisingly general and they pop up everywhere.
25th Aug 2019, 11:28 PM
Schindlabua
Schindlabua - avatar
0
25th Aug 2019, 9:21 PM
Ахан
Ахан - avatar