Notation for Representing Arrays in Math Research

  • Thread starter Thread starter elusiveshame
  • Start date Start date
  • Tags Tags
    Notation
Click For Summary

Discussion Overview

The discussion revolves around the notation for representing arrays in mathematical expressions, particularly in the context of analyzing the RGB color space. Participants explore how to denote arrays and vectors in their formulas and algorithms, questioning the appropriateness of various notational methods.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant seeks clarification on notation for arrays, suggesting a method of marking vectors with x and y on the left side.
  • Another participant notes that "array" is primarily a programming term, while "vector" and "matrix" are more common in mathematics, and suggests defining a matrix using standard notation.
  • A participant expresses uncertainty about whether vectors can contain other vectors as components and asks for appropriate notation for this scenario.
  • One participant proposes a specific vector notation that includes RGB color components and pixel coordinates, while another questions the complexity of the proposed notation.
  • There is a discussion about whether using complex notation is necessary or if simpler forms would suffice, with suggestions to consider data structures instead of nested vectors.
  • A later reply acknowledges the overcomplication of the notation and expresses gratitude for the clarification provided by other participants.

Areas of Agreement / Disagreement

Participants exhibit differing views on the necessity and clarity of various notational methods for arrays and vectors. There is no consensus on a single accepted notation, and the discussion remains unresolved regarding the best approach to represent these mathematical concepts.

Contextual Notes

Participants express varying levels of familiarity with mathematical notation and programming concepts, leading to different interpretations of terms like "array," "vector," and "matrix." The discussion reflects a blend of mathematical and programming perspectives, which may influence the proposed notations.

elusiveshame
Messages
170
Reaction score
35
I apologize if this is in the wrong forum, but I'm not quite sure there's a category where this would fit in.

Anyway, I'm doing an independent research/analysis of the RGB color space, and as I'm writing down my formulas and algorithms, I want to express in the math that certain variables are arrays, and in some cases, array vectors.

My question is, is there any notation specifically for arrays? What I've been using to mark the vectors that are arrays, is putting an x and y on the left side of the vector, like a division problem, just without the line in between.

If there isn't any notation used in any formal math subjects, would this be an acceptable method, as long as it's stated in the report?

Thanks!
 
Physics news on Phys.org
elusiveshame said:
I apologize if this is in the wrong forum, but I'm not quite sure there's a category where this would fit in.

Anyway, I'm doing an independent research/analysis of the RGB color space, and as I'm writing down my formulas and algorithms, I want to express in the math that certain variables are arrays, and in some cases, array vectors.

My question is, is there any notation specifically for arrays? What I've been using to mark the vectors that are arrays, is putting an x and y on the left side of the vector, like a division problem, just without the line in between.

If there isn't any notation used in any formal math subjects, would this be an acceptable method, as long as it's stated in the report?

Thanks!
AFAIK, the term "array" is used mostly in programming contexts and the terms "vector" and "matrix" are used mostly in mathematics. Arrays can be one-dimensional, and therefore synonymous with vectors, or they can be two-, three-, or higher dimensional.

How are you using the term "array?" If you are using this term to mean a matrix, you could define a matrix A like so: ##A \in M_{4x4}##, which says that A is an element of the set of 4 X 4 matrices.

The usual vector notation uses an arrow above the variable, like this:
$$\vec{v}$$
 
  • Like
Likes   Reactions: elusiveshame
Thanks for the reply. I'm about to leave work shortly, but I'll respond with a picture of how I'm currently writing it and to answer your question
 
Mark44 said:
AFAIK, the term "array" is used mostly in programming contexts and the terms "vector" and "matrix" are used mostly in mathematics. Arrays can be one-dimensional, and therefore synonymous with vectors, or they can be two-, three-, or higher dimensional.

How are you using the term "array?" If you are using this term to mean a matrix, you could define a matrix A like so: ##A \in M_{4x4}##, which says that A is an element of the set of 4 X 4 matrices.

The usual vector notation uses an arrow above the variable, like this:
$$\vec{v}$$

I'm using the term array as the programming term, just unbounded in the formula's since these can be applied in several theories and such for programming. Since I wasn't sure of the proper way to write the notations, I sort of combined what I know in the world of math (single variable calculus is the highest math education I've received so far) with programming structure, or at least in a way that makes perfect sense to me :P

Since I'm not familiar with the forums math functionality and how to use it, I drew up what I was talking about in MS Paint :)

Untitled_zps0ce29f71.png


That's how I'm currently notating it. I guess the easiest way to explain it would be saying it's a double vector, so for example the vector C is the color and contains the R, G, and B values, and C would be a part of a Pixel vector at coordinates X, Y and would be the actual RGB value.

Actually, after writing down what I'm trying to do instead of just keeping it in my head, I guess the question should be revised to: Can vectors contain a vector for one of its components? Like, could $$\vec{v}$$ contain $$\vec{c}$$ as one of it's components, and if so, how would you notate it?

And as a sub question, if I were to post my paper on my own website, would viewers see me as completely wacko for using something like I've been doing, or would it be acceptable to do something like that, as long as it's defined in the document?

Thanks :)
 
What do you mean by "double vector?" I think that plain old vectors should work just fine.

$$ \vec{v} = \begin{bmatrix} c_R \\ c_G \\ c_B \\ P_x \\ P_y \\ P_z \end{bmatrix}$$

The vector above has the red, green,and blue components of the color of a pixel in its first three coordinates, and the x, y, and z components of the position of the pixel in its last three coordinates.

The notation you created in Paint seems needlessly convoluted to me. If something simpler will serve the purpose, there's no reason to use complex notation, unless the goal is to obfuscate things.
 
Mark44 said:
What do you mean by "double vector?" I think that plain old vectors should work just fine.

$$ \vec{v} = \begin{bmatrix} c_R \\ c_G \\ c_B \\ P_x \\ P_y \\ P_z \end{bmatrix}$$

The vector above has the red, green,and blue components of the color of a pixel in its first three coordinates, and the x, y, and z components of the position of the pixel in its last three coordinates.

The notation you created in Paint seems needlessly convoluted to me. If something simpler will serve the purpose, there's no reason to use complex notation, unless the goal is to obfuscate things.

I meant nested, not double, sorry :p

Could your example be written as: $$ \vec{v} = |C,P| (with vector notation for C and P)?

(sorry, the matrix either doesn't like vectors inside of it, or I'm just doing it wrong)
 
elusiveshame said:
I meant nested, not double, sorry :p

Could your example be written as: $$ \vec{v} = |C,P| (with vector notation for C and P)?
You could, but why would you want to? I get the sense that you want to use notation just to use notation, and not to clarify or simplify things. If you have a vector whose elements are themselves vectors, then you're really talking about a two-dimensional matrix. If A is such a matrix, and the indexes for the rows run from 1 to 3, then A(1, 2) would be the y coordinate of a particular pixel and A(2, 1) would be the green value of a pixel.

A more natural container for this information might be a structure (or struct in C, C++, etc.). One element of the struct could be an array of RGB values, and another element could be the x, y, and z coordinates. If you have an instance of this struct named pixel, you could access the colors by pixel.RGB[red], and the position by pixel.Position[x], for example.
elusiveshame said:
(sorry, the matrix either doesn't like vectors inside of it, or I'm just doing it wrong)
 
  • Like
Likes   Reactions: elusiveshame
It was more out of curiosity and understanding. I just didn't think of it as the way you put it and was trying to define them separately when there's no need to. After thinking about it some more, you're right, I was over complicating it, which is why it led to this thread :P So, thank you for that! :D

Also, you're right about the struct example, that's exactly what how I'm doing it in VB :)
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 3 ·
Replies
3
Views
20K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
2
Views
1K