21
After seeing arrays and programming matrices, I got a little confused, so I was wondering, what’s the difference between a array and a matrix?
21
After seeing arrays and programming matrices, I got a little confused, so I was wondering, what’s the difference between a array and a matrix?
23
This is more a mathematical concept than programming.
Just as a square is a particular case of a quadrilateral, a array is a particular case of a matrix: it is a matrix with only one dimension.
Understand here array as synonymous with vector.
In programming the type Array is a data structure whose elements can be manipulated/accessed through indices and may have one or more dimensions.
The terms vector and matrix, by analogy to mathematics, are sometimes used to denote Arrays one-dimensional and Arrays two-dimensional, respectively.
19
There’s some controversy about this, but I’ll tell you what’s more acceptable.
Array is the English name for what we call vector.
A vector is a single-dimensional matrix, meaning it has only one row or column of data. Normally we use the term matrix when there is more than one dimension, so it has at least rows and columns, it can have other dimensions.
In other words matrix is a multidimensional vector.
There is the vector which is often confused with matrix, but is not, after all the sizes of each row or column is variable, an array keeps everything of the same size, keeping the "rectangular drawing".
Browser other questions tagged array terminology matrix
You are not signed in. Login or sign up in order to post.
"In other words matrix is a multidimensional vector." --example: (1,1,1) multidimensional ----- A multidimensional vector is still only one vector, but it is presented in several dimensions. For me a matrix is nothing more than a vector of vectors where these are the same size, and this last one scales as you want, always maintaining the same size. Understand if this vector within the first vector can also be a vector of vectors, forming a 3-dimensional matrix.
– Um Programador
As I wrote a vector vector is not a matrix, it has link showing the difference.
– Maniero
example: multidimensional (1,1,1) that is not a matrix
– Um Programador
In computer programming, an array (array) is a data structure that stores a collection of elements in such a way that each of the elements can be identified by at least one index or key. This data structure is also known as the indexed variable, vector (for one-dimensional arrangements) and matrix (for two-dimensional arrangements)
– Um Programador
The translation of array to vector is not yet the best. It would be properly Arrangement
– Um Programador
There’s nothing multi-dimensional about it, there’s only one dimension. Now, as I said at the beginning, there are controversies, there are different definitions, in computing the most accepted is the one I said, which even matches the response of the ramaral. I do not like so much this definition of Wikipedia, after all 3 dimensions is also a matrix. Everyone uses vector, the best translation is what everyone uses, even if strictly it is not the most appropriate. But this is another discussion.
– Maniero
read x=1, y=1, z=1 => multidimensional vector. Half useless to discuss here... I will leave so, and not yield more
– Um Programador
@A programmer In part I agree with you: in English array is not a vector. However I also agree with the bigown: it is commonly used as a vector synonym array. Note that in my reply I was careful to say "Understand here array as synonymous with vector" and to add guy, when I referred to the array in the programming domain. So, by my understanding of the English word array, an array is a particular case of array and not the other way around. But as bigown says "the best translation is what everyone uses"
– ramaral
"the best translation is what everyone uses" states that if everyone is wrong then wrong is right. What is not true. The best translation is the one closest to true meaning
– Um Programador
This is a subject of linguistics, this should be discussed in https://portuguese.stackexchange.com/, there are experts on this, here we discuss computing, we talk about terminology in the way we use, right or wrong from the linguistic point of view.
– Maniero