Live data from Hacker News

Why tensors? A beginner's perspective

mfaizan.github.io

91–100 of 109 posts

Re: Why tensors? A beginner's perspective

#91
post #88
post #85

Earlier quoted context omitted.

My favorite colors are 1, 2, 3 and 4 in some 8-bit grayscale color space. Here's a matrix [ 1 2 ] [ 3 4 ] This represents some linear transformation, and is a matrix. Are you trying to argue otherwise? FYI, matrices transform between vectors within a vector space.

You have a list of labels you've conveniently decided to conflate with numbers. It's fine to use an enum for your data, but no, this data structure is not meant to convey a transformation. You bring up a good point though, if this were meant to be a transformation, then we're talking about modules (Z/2^8Z being the underlying ring) and not vector spaces, which is fine. I was needlessly narrow when I said "vector spac…

You can have matrices of anything including rings, quaternions, octonions, dual numbers, matrices, vectors, bras, kets, etc etc, as long as you can multiply and add those objects. If you prefer real numbers, use the corresponding wavelength of the light, or voltage values in a photosensor, it doesn't matter. It still is a matrix.

Why do you mention things like data structures, enums and labels? This is math, not C++.

Anyway, the point is, any arbitrary 2D arrangement of numbers can be a valid matrix, whatever those numbers may represent.

Re: Why tensors? A beginner's perspective

#92
post #90
post #37

Earlier quoted context omitted.

Randall Monroe has a comic about how most people need enough math to be able to handle a birthday dinner where the guests split the bill for the birthday boy/girl evenly and pay for their meals and tip separately. That’s a pretty good bar and I wonder if we could just cut to that chase earlier. But I also believe that people need enough math to see when they’re being cheated, and I feel like you could just tell middl…

Except that humanity desperately needs a better understanding of probabilities and non-linear relationships. We don't use more than division because we haven't succeeded teaching more, not because nobody needs it.

Do we actually need to know how it works, or do we just need to really deeply understand that common sense is not scientific evidence and everything we actually care about can't be predicted just by "Being smart and thinking about it"?

Actually being able to do stuff with Bayes law by hand is going to be not only hard to teach, but probably impossible to remember for those of us who don't actually do math in real life. People forget stuff after a few months or years.

I highly doubt the average person is interested in checking the math on a science paper, so if you want the general public to understand statistics you... have to show us all a reason to, and also teach us all of the related skills needed to make it useful. Or else.... we will all just forget, even with the best teacher in the world.

Most of us aren't doing random game engines as a hobby project or testing things on bacteria cultures.

Maybe they should teach it in context of how to understand a scientific paper, since that's one of the more relevant things for non-pros. If you just teach statistics alone people will say

"Ok, now I know that it's easy to lie to yourself if you don't use any numbers but I don't have collections of large numbers of data points in my life to actually analyze"

Re: Why tensors? A beginner's perspective

#93
post #74

Earlier quoted context omitted.

Mathematicians would disagree with you there. There are no coordinates to transform in an ordinary tensor space and therefore no way for a tensor to be affected by such a transformation. Matrices (or linear transformations in general) are important examples of tensors. There's a nice adjunction between tensor spaces A(x)B and the space of linear transformations B=>C given by: Hom(A(x)B, C) = Hom(A, B=>C) In the case…

Which mathematician disagrees with what exactly? Tensors are introduced by physicists to ensure various physical quantities (which involve coordinates and their derivatives) do not depend on the arbitrarily chosen coordinate system. This is ensured through the transformation properties of tensors. The name tensor itself comes from the theory of elasticity, Cauchy stress tensor, which BTW is uniform in many practical…

i did a whole phd-level course (a long time ago) in deformable materials, which was entirely based on tensors, and i still don’t know how to differentiate one from vectors/matrices. even the idea that tensors must obey coordinate transforms doesn’t really do it, since the practical applications of vectors/matrices do so as well.

it’s like some people invented a new word and won’t tell you what it actually means in sufficient detail to differentiate it from all the other words you know. so you keep using it with others in the hopes that contextual information will finally make it clear. one day.

Re: Why tensors? A beginner's perspective

#95
post #91
post #88

Earlier quoted context omitted.

You have a list of labels you've conveniently decided to conflate with numbers. It's fine to use an enum for your data, but no, this data structure is not meant to convey a transformation. You bring up a good point though, if this were meant to be a transformation, then we're talking about modules (Z/2^8Z being the underlying ring) and not vector spaces, which is fine. I was needlessly narrow when I said "vector spac…

You can have matrices of anything including rings, quaternions, octonions, dual numbers, matrices, vectors, bras, kets, etc etc, as long as you can multiply and add those objects. If you prefer real numbers, use the corresponding wavelength of the light, or voltage values in a photosensor, it doesn't matter. It still is a matrix. Why do you mention things like data structures, enums and labels? This is math, not C++.…

Sure, I can get rid of the word enum. The symbols in the example are numerals for sure, but you explicitly say they're representing colors. I don't know how to multiply colors. What I'm saying is you merely have labels there, the numbers those numerals usually represent have nothing to do with the explicitly stated meaning. If I saw that array without context, yeah sure, I'd assume it's a matrix. But there is context that tells me interpreting this as a transformation makes no sense.

I'm genuinely claiming they aren't numbers due to the explicit context. The entries are colors with numerals as labels.

Now, you've said something slightly different where I think we can agree. If the entries are from a set closed under a notion of multiplication and addition, then it represents a matrix even if it isn't being used in that way. But I still say that if you're merely using the array as a place to keep some data then I won't be using the word matrix, I'll just call it an array.

Anyway. I started this by saying it was interesting that we use the word matrix slightly differently. I still think that's interesting and think it's totally fine if you want to call an array a matrix even if the entries don't come from something where a transformation makes sense. I wouldn't "correct" someone's usage. I just think it's interesting how we use it different. Anyway, I feel like you just think I'm dumb, so I'm ending this here. You might not, but it's hard to read the vibe via text. If you have something to add you think will get me to change my word choices, feel free to respond and I'll read it, but I'm not replying on this thread anymore.

Re: Why tensors? A beginner's perspective

#96
post #56

Earlier quoted context omitted.

Is there any book that treats whole off geometry using vectors?

I’m not sure I understand the question enough to answer. Do you mean something like differential geometry? There, the theory is built upon vectors and covectors (i.e., differential forms) that are associated with tangent spaces and cotangent spaces, respectively. But that is modern differential geometry and not classical geometry.

I was asking for a classical geometry book which is using a treatment using vectors. Usually classical geometry is treated without resorting to vectors.

Re: Why tensors? A beginner's perspective

#97
post #75

Earlier quoted context omitted.

This is mostly a semantic argument, but I find this to be a very annoying perspective. Given a basis, there is a natural isomorphism between tensors of a certain type and multidimensional arrays of certain dimensions.

But it's like calling my table a cat because they both have four legs.

If your table is furry and has a tail it may actually be a cat (from a machine learning perspective).

The machine learning packages have an einsum function / tensor contraction, etc. What more do you need for it to be called a tensor?

Re: Why tensors? A beginner's perspective

#98
post #30

Earlier quoted context omitted.

I'm pretty sure that a multidimensional array was the original implementation of tensors and the more fancy linear forms formalism came later in the twentieth century. Then the question was how do these multidimensional arrays operate on vectors and how do they transport around a manifold. (Source: first book I read on general relativity in the 1970s had a lot of pages about multidimensional arrays and also this good…

AFAIU, Matrices are categorically subsets of Tensors where the product operator, at least, is not the tensor product but the Dot product. Dot product: https://en.wikipedia.org/wiki/Dot_product Matrix multiplication > Dot product, bilinear form and inner product: https://en.wikipedia.org/wiki/Matrix_multiplication#Dot_prod... > The dot product of two column vectors is the matrix product Tensor > Geometric objects http…

Mathematicians are comfortable with the idea that a matrix can be over any set, in other words matrix is a mapping from the cartesian product of two intervals [0,N_i) to a given set S. Of course to define matrix multiplication you need at least a ring, but a matrix doesn’t have to define such an operation, and there are many alternative matrix products, for example you can define the Kronecker product with just a matrix over a group. Or no product at all for example a matrix over the set {Red,Yellow,Blue}.

Tensors require some algebraic structure, usually a vector space.

Re: Why tensors? A beginner's perspective

#99
post #85
post #82

Earlier quoted context omitted.

I'm not sure I buy this after you just used an example of a 2d array of you're favorite colors just a few minutes ago. Maybe I'm missing something. What kind of linear transformation does that represent, and between what vector spaces?

My favorite colors are 1, 2, 3 and 4 in some 8-bit grayscale color space. Here's a matrix [ 1 2 ] [ 3 4 ] This represents some linear transformation, and is a matrix. Are you trying to argue otherwise? FYI, matrices transform between vectors within a vector space.

> FYI, matrices transform between vectors within a vector space.

Square ones do, but m x n ones represent linear maps from an n-dimensional to m-dimensional vector space (over the/a field containing the elements of the matrix).

Re: Why tensors? A beginner's perspective

#100
post #75

Earlier quoted context omitted.

But it's like calling my table a cat because they both have four legs.

If your table is furry and has a tail it may actually be a cat (from a machine learning perspective). The machine learning packages have an einsum function / tensor contraction, etc. What more do you need for it to be called a tensor?

I'm not familiar with tensor contraction as practiced by a machine learning package, but summation convention is just that, it's not a fundamental property of tensors.

As a way of describing physics or geometry they have additional structure which I'm not seeing.

Post reply on HN