text:
# Posts where each letter is a link January 2, 2010 12:19 AM   Subscribe

Do users still post in the blue with words where each letter is a different link?

I've been a lurker here for a several years, and only in the last few months really I have tried to really be a part of this community that I really love. I would like to post something special someday to the blue but while I try to overcome my online "shyness", I've noticed that posts more recently on the blue don't tend to have words where each letter is a link. Has the community as a whole decided that such posts constitute too many links? Or is just too time consuming to read or post all those links?

Here is a really old example of what I'm talking about, but I know there have been more examples in more recent years.
posted by dealing away to Etiquette/Policy at 12:19 AM (65 comments total) 3 users marked this as a favorite

I thought everyone stopped doing that because I don't like it.

PS, if you've got something interesting, jump right into the blue. Worst case, you get spanked in MetaTalk. Conveniently, you're already here!
posted by stupidsexyFlanders at 12:25 AM on January 2, 2010 [3 favorites]

I think the consensus is that linkifying each letter of a word is not a constructive way to frame the links in a post, most of the time. Although as a stylistic choice I suppose it's occasionally okay.
posted by killdevil at 12:27 AM on January 2, 2010

But yeah, if you have something to post, by all means post it and see how things go. Tis better to contribute and be GRARed at than never to post at all.
posted by killdevil at 12:30 AM on January 2, 2010

Yeah, they're not very userfriendly. It can be annoying to try to click on a link but because of moving the mouse a single pixel end up clicking a different link. Also, they usually have very little information about the material, which makes them slightly hard to parse. I seem to remember some outcry about them but I can't seem to hit on the magic Google search terms to find examples.

Once I was 5/7ths of the way to making a post about "discussion" that would've been only the word "discuss" and each letter linking to a different essay about discussion/conversation. This was during the time when every post that ended with an imperative "discuss" was met with snark. I thought better of it, but not before searching high and wide for other essays about conversation and discussion.
posted by Kattullus at 12:34 AM on January 2, 2010

There's no rule against doing this. I guess people just stopped, in the same way that people just stopped watching Sing Along With Mitch! Doesn't mean singing along with Mitch was a bad thing, necessarily. I like posts with a link on every letter. I would be happy if people did this more.

To be honest, I like Mitch, too. He's before my time, but I have one of his records. It's neat, and I like the idea of people sitting around together and singing, no matter how "lame" that sounds now.

So, yeah: do the post.
posted by koeselitz at 12:35 AM on January 2, 2010

The preferred method is to link a word only not every letter in several words. Also, please have a root beer float bomb on me.
posted by mlis at 12:45 AM on January 2, 2010 [1 favorite]

Hey, by the way:

One good way to make link-per-letter posts more intelligible is to use mouseover text to explain the links. It's really easy to add to linked text; if you type this:

Here is some dummy text.

.... it will come out looking like this:

Here is some dummy text.

.... to make links with mouseover text like this:

In this way, you can aggravate the smallest number of people with link-per-letter posts, because at least this way things are explained nicely before they have to click.

[Don't bet on all those html entity names parsing right, but I'll explain what isn't clear...]
posted by koeselitz at 12:46 AM on January 2, 2010 [49 favorites]

koeselitz, I had no idea what Sing Along with Mitch! was, but now after looking it up, I'm happy to learn about it.

I guess the hard thing I find with Metafilter is that sometimes I like the comments better than the actual links. I usually read the first few comments, and if I find the discussion interesting, then I go to read the actual links. The hard part is time. It takes time to read the links and then involve yourself in the conversation in a meaningful way. How do some of many of you do this so well?

Btw, I'll make a post someday. Maybe I'm over thinking it too much wanting to make a grand slash and create an awesome post but never get around to it because it feels like I'll never get exactly right. (Maybe this sadly resembles my teen years and wanting to have sex for the first time...)
posted by dealing away at 12:47 AM on January 2, 2010

[Argh. Now I'm wondering if you can add title elements to href fields at all.. Test test.]
posted by koeselitz at 12:49 AM on January 2, 2010

Yep! Works!
posted by koeselitz at 12:49 AM on January 2, 2010

That's a pretty nifty trick there koeselitz. Is that feature used rarely, regularly or often in posts? (Did I just miss it altogether? I"ll keep an eye for it now)
posted by dealing away at 12:53 AM on January 2, 2010

dealing away: “Btw, I'll make a post someday. Maybe I'm over thinking it too much wanting to make a grand slash and create an awesome post but never get around to it because it feels like I'll never get exactly right.”

Well, if you want to impress people and make a splash, explanatory mouseover text is the way to go. But I find that waiting too long and wanting things to be perfect prevents me from ever posting anything. Just go ahead - a lot of us will probably be happy to see whatever you put up, and if we aren't, the front page'lll scroll by in a day or two, anyway. Dive in!

“(Maybe this sadly resembles my teen years and wanting to have sex for the first time...)”

Well, it's sort of like that. Only this time you've got a supple, experienced, caring partner who's willing to walk you through it if you'd ever like to try. That's what Metafilter is: that slightly-sleazy older person who helps you fumble through your first sexual experience.

At least we're classier than that gym teacher that kept making weird passes at you a few years ago when you were a freshman. You remember him - Mr. Fark.
posted by koeselitz at 12:57 AM on January 2, 2010 [6 favorites]

It's pretty rare. Took me ages to figure out how to do it.
posted by koeselitz at 12:58 AM on January 2, 2010

killdevil: "Tis better to contribute and be GRARed at than never to post at all"

YOU LIE!

Ahem, what I meant to say was that as a staunch FPP virgin, I disagree. I fear the GRARing.
posted by IndigoRain at 1:20 AM on January 2, 2010 [4 favorites]

FPP purity club, represent!
posted by qvantamon at 4:38 AM on January 2, 2010 [2 favorites]

Metafilter: slightly-sleazy older person who helps you fumble through your first sexual experience.

NO!!!
posted by infini at 4:39 AM on January 2, 2010 [1 favorite]

Yeah, I like those posts about as much as I like the ones where the post text doesn't describe what the poster is linking to. Which is to say I think they're stunty, overly cutesy, and not in any way worth my time.
posted by Afroblanco at 5:11 AM on January 2, 2010 [3 favorites]

There are probably good stylistic reasons to do a pixel-hunt linkbomb post, but I can't think of any. The conventions of hypertext exist for a reason, and that reason is easy and intuitive approachability for the reader. If you're reducing the readability of your post intentionally, there ought to be a pretty good reason.

By the way: cleverness and "originality," given that this style of posting was long overused, are not going to be perceived as pretty good reasons.
posted by majick at 6:40 AM on January 2, 2010 [2 favorites]

My feeling is that they've just fallen out of fashion over time as the fairly consistent (though not unanimous) negative reaction that style of post tends to get accumulated and made it seem like a less likely posting strategy. I doubt we've seen the last of them and I'm kind of a spice-of-lifer myself within reason as far as that stuff goes, but in practical terms having them not happen very often is probably for the best.

Mouseover text is nice, but it doesn't solve the core readability problem—it's not necessarily obvious that there are a bunch of links jammed together, and even with mouseover text it's slow and fiddly to figure out what even well-annotated links are.

My advice if you're burning to make a new post is to first make sure you really believe in the material you'd be posting and aren't just hoping you've found something good enough to excuse making a first post; then post about it in a concise but clear fashion so that folks seeing the post will know (a) what they're being shown and (b) why, from a general rather than personal perspective, it's interesting. A post like that rarely goes wrong, and you can worry about working on points for style once you're more comfortable with the whole posting process itself.
posted by cortex (staff) at 7:16 AM on January 2, 2010 [3 favorites]

It takes time to read the links and then involve yourself in the conversation in a meaningful way. How do some of many of you do this so well?

I never actually read the links. it's always just some know-it-all Poindexter going blah blah blah blah and who has the time?

So, in conclusion, BOOBIES!
posted by Slarty Bartfast at 7:21 AM on January 2, 2010

I don't think those are great posts. If you make one, many people are going to roll their eyes and probably won't give your post a second look. Very few people will visit many links in your post, meaning the time you spent carefully crafting it and its mouseover text* will go to waste. Did you notice that your example post had more links than comments?

Tis better to contribute and be GRARed at than never to post at all.

This is wrong. There is no need to post to the front page. You can be a fine community member and contribute plenty without posting ever. You should post when and if you have something really interesting that doesn't require a stunt post or a linkdump.

* Yes, it is better to have mouseover text if you absolutely have to have unintelligible links. But, in fact, you never have to have them in the first place.
posted by grouse at 7:29 AM on January 2, 2010

For all of the reasons above I think this technique is not worth the trouble. Additionally, if you're going to be posting YouTube videos as letter-links you must consider the inline video Preference setting that many users have activated. It will turn your pretty multi-link word into an ugly, incomprehensible box-arrow-fest.
posted by carsonb at 7:41 AM on January 2, 2010

Darnit, another shadowy back alley .png lost to the Great Hackening.
posted by carsonb at 7:42 AM on January 2, 2010

The ONLY time that I think that sort of post is acceptable would be if the links are all equally interesting examples of a type.

For example, let's say you want to post links to a bunch of abstract photographs of smoke rings (just an example). Then I think just posting the phrase Smoke Rings with each letter being a link is ok. It doesn't really matter which link you click or how many links you click, you'll still very quickly get the idea of the post and be able to contribute to the conversation if there is one.

However, unless the linked material is obviously fantastic at a cursory glance, expect a lot of wtf comments, if you get any comments at all.
posted by empath at 8:10 AM on January 2, 2010

FPP virgins? Purity clubs? Next it'll be "Who wants to FPP side hug??? OMG"
posted by boo_radley at 8:35 AM on January 2, 2010 [1 favorite]

Doesn't mean singing along with Mitch was a bad thing, necessarily.

Hey, did you know that Mitch Miller played with Charlie Parker?
posted by timeistight at 8:47 AM on January 2, 2010 [1 favorite]

Mitch Miller crushes FFPs-where-every-letter-is-a-link like a grape.
posted by fixedgear at 9:08 AM on January 2, 2010

Do users still post in the blue with words where each letter is a different link?

No, thank God.
posted by SLC Mom at 9:30 AM on January 2, 2010

The FFP Purity Club is the only such club I'm ever likely to belong to. Also, more to the point, if I come across something worth posting to the blue, I will do it. So I encourage you to do so. But so far, you guys have already been to all the places I find. Who's passing out the Purity Rings?
posted by Hobgoblin at 9:42 AM on January 2, 2010 [1 favorite]

WTF IS AN FFP YOU N00BS
posted by mr_crash_davis mark II: Jazz Odyssey at 9:49 AM on January 2, 2010

Front Front Postolution, grampa.
posted by cortex (staff) at 10:12 AM on January 2, 2010

Those kind of posts seem a little gimmicky and I never read them. I'm way too jittery to successfully click all those letters.
posted by futureisunwritten at 10:24 AM on January 2, 2010

Your FPP virginity is a gift, perhaps the most valuable gift you can give. You have to wait until the right link comes along, and then you have to make a commitment, under the auspices of MaJeCoVa (blessed be their many names). Don't just give up your FPP virtue to the first hot newsfilter or snazzy SLYT that winks at you.

As an FPP virgin myself, I am singularly qualified to advise you in these matters. Bless you, my little user, now go browse in peace.

Can we squeeze anything more out of this?
posted by Salvor Hardin at 10:26 AM on January 2, 2010 [3 favorites]

if you've got something interesting, jump right into the blue. Worst case, you get spanked in MetaTalk

can i get spanked in metatalk without posting anything to the blue?
posted by bitteroldman at 10:36 AM on January 2, 2010

i just want to get spanked
posted by bitteroldman at 10:36 AM on January 2, 2010

In my case, FFP is a typo. I meant Front Page Post, which is FPP, and which makes absolutely no sense. Mitch Miller.
posted by fixedgear at 10:48 AM on January 2, 2010

If the subject of the post has already made it to the Blue several times, I'll occasionally squeeze all the FPP links into a single "previously." It's a quirk, sure, but I can justify it as an unobtrusive visual indicator that the subject has a long history with Metafilter.

My addiction to confusingly contiguous links, on the other hand, is inexcusable. In my defense, I was raised in prison and know no other way.
posted by Iridic at 11:07 AM on January 2, 2010

Those posts can be stunt-y, and sometimes the links are not great, just there for filler. Posts where there's a visible break between links work better for me. Quality links are far better then Quantity links.
posted by theora55 at 11:14 AM on January 2, 2010

I'm sort of against mystery meat posts in general* but there's no reason that the cutesy one letter link stuff has to be mystery meat if you've given it proper context - surrounding it with actual sentences in English for instance.

* this is no guarantee that I haven't done it myself.
posted by Artw at 11:28 AM on January 2, 2010

I linked a couple of single letters in my last post, additional information about the figure who was the central subject. That was in a four-letter word (not that sort of four letter word, you filthy so-and-so!) and recall adjusting the links at last minute from being two to one letter, so as deliberately to leave a gap and avoid that annoying thing where you can't tell easily where one link ends and another starts.
posted by Abiezer at 11:45 AM on January 2, 2010

dealing away: I would like to post something special someday to the blue...

I think the best method is just to post something you find interesting and hope that at least a few folks find it interesting too. I'm a resoundingly unsuccessful front page poster but to be totally honest, I don't find the bulk of what's sent to the blue to be all that interesting. In other words, my interests do not usually intersect with those of the blue-faced MeFi masses very often, so I like to think of my few FPPs as catering to tiny minority fringe readers.

This is mostly to make myself feel better about the fact that I really suck at it.
posted by DarlingBri at 12:14 PM on January 2, 2010

Previously in MetaTalk -- I wouldn't have necessarily thought of the drawback that people with motor-control difficulties could find this difficult, but it's good to keep in mind.
posted by palliser at 12:24 PM on January 2, 2010

Oh, and ignore haters. Some people just feel the need to be dickish if an FPP doesn't fall into their narrow band of interests, And make a fuss accordingly, but those people are contemptable idiots and you shouldn't pay attention to them.
posted by Artw at 12:26 PM on January 2, 2010

posted by Lynsey at 12:49 PM on January 2, 2010

Nowadays it seems like the people who like to post a zillion links post them in the more inside.

The original letter-link style was before more-inside existed.
posted by smackfu at 1:10 PM on January 2, 2010

posted by Marisa Stole the Precious Thing at 1:27 PM on January 2, 2010

Hobgoblin: "The FFP Purity Club is the only such club I'm ever likely to belong to. Also, more to the point, if I come across something worth posting to the blue, I will do it. So I encourage you to do so. But so far, you guys have already been to all the places I find. Who's passing out the Purity Rings"

Qvantamon gave me mine.
posted by IndigoRain at 1:28 PM on January 2, 2010

Salvor Hardin: "Your FPP virginity is a gift, perhaps the most valuable gift you can give. You have to wait until the right link comes along, and then you have to make a commitment, under the auspices of MaJeCoVa (blessed be their many names). Don't just give up your FPP virtue to the first hot newsfilter or snazzy SLYT that winks at you."

Are you looking forward to the FPP purity daughter/ daddy dance?
posted by boo_radley at 2:13 PM on January 2, 2010 [1 favorite]

Can we squeeze anything more out of this?

Oh, I'm sure we can.

Make sure that when you do decide to go 'all the way', that you protect yourself by using the metafilter site search. Even if you think that the link you're posting has never been posted before, you'll still want to be safe. Chances are, if the link is that hot, it's probably been passed around the internet a few times before it got to you.

If you do decide to go ahead without protection and it turns out that you posted a double, there's always the 'flag-this-post' option available for the morning after. You don't want to use that as a substitute for site-search, but the option is available in case you make a mistake (and everyone does make mistakes, there's no shame in that).
posted by empath at 2:18 PM on January 2, 2010 [2 favorites]

I made a few of those, back in the day. They were fun but a lot of work. It took so long--I was on dial up and the screen kept freezing and then I would lose everything. Which was very frustrating. So, I ended up composing in Notepad and then testing the posts by pasting them into the comment box in unread threads. Which took hours, sometimes.

And, as you can see in the example above, people howled about it. For me, it was exploring the possibilities when I was doing them. For others, well, some people live to get angry and nasty about something. Nothing like putting some time and effort into making something just to get slimed from the git go by some person I will never meet.
posted by y2karl at 4:43 PM on January 2, 2010

Or should I say..

And, as you can see in the example here, some people howled about it.

Some had issues with the style, some with me. And some of the latter got over that. We all started rougher than we turned out. One thing about this place is that it trains you to be kinder. If you let it.
posted by y2karl at 5:11 PM on January 2, 2010

I feel that title-text in links is heavily underused; it's great to be able to mouseover some link in the middle of a sentence and get an exact description f what you'll see when you follow it.

Incidently, I also wish we could use LaTeX markup in our posts. It would make it much easier to express important quantities like $\int_0^\inf e^{-x^2} dx$.
posted by kaibutsu at 5:27 PM on January 2, 2010

kaibutsu: “Incidently, I also wish we could use LaTeX markup in our posts. It would make it much easier to express important quantities like $\int_0^\inf e^{-x^2} dx$.”

I too would like to use LaTeX markup in posts and comments on Metafilter. In fact, pb has promised me that the LaTeX options will be added next as soon as he finishes my long-hoped-for mefi-emacs module.
posted by koeselitz at 6:16 PM on January 2, 2010

make sure you really believe in the material you'd be posting

That's a really good litmus test even for us less-green hands.
posted by Miko at 6:30 PM on January 2, 2010

Linky is a really good Firefox extension for posts styled this way.
posted by IndigoRain at 8:38 PM on January 2, 2010

palliser writes "I wouldn't have necessarily thought of the drawback that people with motor-control difficulties could find this difficult, but it's good to keep in mind."

It also can sound horrible and incomprehensible with a screen reader for the blind.
posted by Mitheral at 10:28 PM on January 2, 2010 [1 favorite]

That posting style is to be denigrated.
posted by caddis at 5:50 AM on January 3, 2010

It also can sound horrible and incomprehensible with a screen reader for the blind.

That makes me wonder how screen reader software handles sentences that contain embedded links, which is quite common.
posted by smackfu at 8:33 AM on January 3, 2010

i know they don't deal with emoticons but do communicate their existence, i'm guessing by saying "colon, bracket" or some such. i have an email correspondent who is blind and uses such a reader and in the early days he asked me what "that" was and I told him it was a smiley
posted by infini at 8:56 AM on January 3, 2010

smackfu writes "That makes me wonder how screen reader software handles sentences that contain embedded links, which is quite common."

That is admittedly a pretty low level problem that is often solved by just skipping that information. Pages without site maps that have navigation buried in multi layer menus, especially when spread across the page, and flash navigation are the biggest problem. Metafilter is a breeze.

[1] Users often can listen to a page faster than I could. They get comprehension where all I'd get was a stream of words.
posted by Mitheral at 10:39 AM on January 3, 2010

posted by deborah at 12:45 PM on January 3, 2010

not fair, deborah, not fair
posted by koeselitz at 12:51 PM on January 3, 2010

For some reason, I have a very firmly-held opinion that this is only okay for links to pictures. e.g., unicorns.
posted by ErikaB at 7:08 PM on January 3, 2010

Don't just give up your FPP virtue to the first hot newsfilter or snazzy SLYT that winks at you.

I gave my blue postginity to the Jersey Shore today. I feel so dirty.
posted by joechip at 10:06 PM on January 3, 2010

I think the best method is just to post something you find interesting and hope that at least a few folks find it interesting too. I'm a resoundingly unsuccessful front page poster ...
This is my method for the very infrequent posts that I do. Don't stress too much about what other people like. This place is big enough now that, if you like it, someone else will too.
posted by dg at 2:58 AM on January 4, 2010

« Older Bageena, RIP   |   Brooklyn meetup at Speak Low Newer »

You are not logged in, either login or create an account to post comments


text:
# Open SourceMolecular Dynamics

### Sidebar

#### For Developers

exercises:2017_uzh_cmest:stm

This is an old revision of the document!

# Simulation of STM images for a graphene nanoribbon adsorbed on a metallic substrate

In this exercise we are going to see how we can generate Scanning Tunneling Microscope (STM) images from simulations. While this is a more elaborate example where we need additional scripts and techniques, the basic idea is simple: Imagine a STM cantilever scanning the surface in the constant current mode, the current is then proportional to the electron density, which is something we get from our simulation (remember the cube files?). Therefore, all we have to do is to find an isosurface of the electron density and plot this isosurfaces z-coordinate.

This exercise is based on ideas and material by Daniele Passerone.

## Preparation

• On the server is a package for you to unpack: tar xf /…, afterwards you should get a number of files in your current directory.
• The scripts are contained in yet another python package: pip install –user https://github.com/ltalirz/asetk/archive/master.zip, and since you have setup the path variable in a previous exercise, you should now have the following commands available:

format: plain


text:
Xml2rfc generates RFCs and IETF drafts from document source in XML according to the IETF xml2rfc v2 and v3 vocabularies.

## Introduction

The IETF uses a specific format for the standards and other documents it publishes as RFCs, and for the draft documents which are produced when developing documents for publications. There exists a number of different tools to facilitate the formatting of drafts and RFCs according to the existing rules, and this tool, xml2rfc, is one of them. It takes as input an xml file which contains the text and meta-information about author names etc., and transforms it into suitably formatted output. The input xml file should follow the grammars in RFC7749 (for v2 documents) or RFC7991 (for v3 documents). Note that the grammar for v3 is still being refined, and changes will eventually be captured in the bis draft for 7991. Changes not yet captured can be seen in the xml2rfc source v3.rng.

xml2rfc provides a variety of output formats. See the command line help for a full list of formats. It also provides conversion from v2 to v3, and can run the preptool on its input.

## Installation

Installation of the python package is done as usual with ‘pip install xml2rfc’, using appropriate switches and/or sudo.

### Installation of support libraries for the PDF-formatter

In order to generate PDFs, xml2rfc uses the WeasyPrint module, which depends on external libaries that must be installed as native packages on your platform, separately from the xml2rfc install.

First, install the Cairo, Pango, and GDK-PixBuf library files on your system. See installation instructions on the WeasyPrint Docs:

(Python 3 is not needed if your system Python is 2.7, though).

(On some OS X systems with System Integrity Protection active, you may need to create a symlink from your home directory to the library installation directory (often /opt/local/lib):

ln -s /opt/local/lib ~/lib

in order for weasyprint to find the installed cairo and pango libraries. Whether this is needed or not depends on whether you used macports or homebrew to install cairo and pango, and the homebrew / macport version.)

Next, install the pycairo and weasyprint python modules using pip. Depending on your system, you may need to use ‘sudo’ or install in user-specific directories, using the –user switch. On OS X in particular, you may also need to install a newer version of setuptools using –user before weasyprint can be installed. If you install with the –user switch, you may need to also set PYTHONPATH, e.g.,

PYTHONPATH=/Users/henrik/Library/Python/2.7/lib/python/site-packages

for Python 2.7.

The basic pip commands (modify as needed according to the text above) are:

pip install ‘pycairo>=1.18’ ‘weasyprint<=0.42.3’

With these installed and available to xml2rfc, the –pdf switch will be enabled.

For PDF output, you also need to install the Noto font set. Download the full set from https://noto-website-2.storage.googleapis.com/pkgs/Noto-unhinted.zip, and install as appropriate for your platform.

## Usage

xml2rfc accepts a single XML document as input and outputs to one or more conversion formats.

Basic Usage: xml2rfc SOURCE [options] FORMATS...

Run xml2rfc --help for a full listing of command-line options.

## Changelog

### Version 2.27.1 (10 Sep 2019)

• Refined the preptool code that inserts reference target URLs to use an more appropriate guess at the extension, depending on the base URL.
• Corrected a mismatch between the default value for a switch in run.py and base.py.
• Changed the code for the –id-is-work-in-progress to avoid duplicate <refcontent> insertion.

### Version 2.27.0 (09 Sep 2019)

• Added a test for handling of &wj; and   during text linebreaking.
• Corrected the line break handling for &wj; and &zwsp; and changed to using a unicode private use code for internal “don’t break” handling, in order to make use of &wj; possible in the XML source input.
• Added country name aliases for South Korea.
• In text renderer: Reverted ‘Internet Draft’ to ‘Internet-Draft’ for series name rendering. Stripped empty parts from Updates: and Obsoletes: lists. Added removal of U+2060 (word joiner) before emitting rendered text.
• Adjusted the preptool inserted reference target value for Internet-Drafts to include a trailing ‘.txt’ to avoid 404s
• Added U+2060 (word joiner) to the list of code points that should not trigger non-ASCII warnings
• Added an –id-is-work-in-progress switch to let the RPC automatically add a <refcontent> element indicating “Work in Progress” for Internet-Drafts.
• In HTML output, removed blank items from Updates and Obsoletes lists, and reverted ‘Internet Draft’ in reference rendering to ‘Internet-Draft’.
• Added entity definitions for &wj; and &zwsp;
• Fixed pyflakes issue; a variable name mismatch.
• Updated the installation instructions emitted when –pdf is specified without having the necessary libraries in place to also include instructions for Noto font installation.
• Fixed an issue with the ToC generation where sections without numbers might still be rendered with the whitespace intended to go between number and section title.
• Fixed an issue with the HTML ToC where sections without numbers might still be rendered with the whitespace intended to go between number and section title.
• Removed pilcrows from print layout to avoid spurious extra lines for paragraphs where the pilcrow would not fit at the end of the last line.
• Fixed an insufficient test for URL vs. local file when handling the –metadata-js-url switch.
• Tweaked the CSS for print to avoid reference entries beginning on a new line, below the reference tag.

### Version 2.26.0 (03 Sep 2019)

• Fixed a broken rendering of Obsoletes: and Updates:, broken in different ways in v3 HTML and v3 text output. Fixes issue #423.
• Added an alternative style sheet from Martin Thomson (reachable with –css=mt) and rewrote the code to read in alternative style sheets to look in more places. Also added a mt.js file to go with the mt.css file, and tweaked the html renderer to load an alternative .js file if an alternative .css file is set and a matching .js exists.
• Fixed an issue with nested <ul> with emtpy=”true”.
• Added a test, with error exit, for duplicate <displayreference> replacement terms. Fixes issue #421.
• Changed the rendering of Internet-Draft references to follow draft-flanagan-7322bis-03 (RFC Style Guide bis) more closely.
• Made the address pane for authors’ addresses wider, to accomodate very long email addresses. Changed the bottom margin for some styles used by figures in order to get the same caption placement for figures and tables.
• Removed the computed <dl><dd> text mode indentation, and replaced it with a fixed indentation of 3.
• Added an example section using <aside> to element.xml. Updated the <xref> examples that use the section attribute.
• Updated the prepping and rendering of <xref> with section settings to better handle sectionFormat=”bare”, and changed the handlin of the metadata.js script in HTML output.
• Added a minified version of the metadata.js script, updated the help text for the –external-css switch, and changed the default for the –metadata-js-url switch to use the minified metadata.js file, and changed the metadata_js_url setting for invocation of xml2rfc renderers as library modules to use the minified metadata.js
• Updated metadata.js with a new copy received from the RFC Editor staff.
• Added a warning for mismatch between <rfc number=”…”> and <seriesInfo name=”RFC” value=”…”>.
• Modified the v2v3 conversion code to deal correctly with multiple instances of <artwork> within an unlabelled Figure. Modified the converter to avoid some lxml-related issues under python 3.x.
• Updated XmlRfc.__init__() with a new keyword argument to set source file, needed when using the v2v3 converter as a library function (such as from id2xml in v3 mode).
• Incorporated a new updated copy of the original CSS stylesheet received from the original contractor.

## Project details

Uploaded source


text:
# [ SDL2 – Part 6 ] Using SDL_Textures

In this tutorial you will learn how to load images ( just .bmp for now, the next part will cover .png ). First of all, a little info about the two new structs we’ll be using

### SDL_Surface

This is part of the old SDL ( before 2.0. ) It was used for just about everything related to rendering.

SDL_Surface is used for holding the raw texture data. Basically it says what the color for every pixels is. Sort of like this :

• pixel[ 0, 0 ] = 128, 64, 255, 255 ( 128 red, 64 green, 255 blue, 255 alpha )
• pixel[ 1, 0 ] = 255, 32, 128, 128 ( 255 red, 32 green, 128 blue, 128 alpha )
• ..etc

( This might not be 100% true for all cases, but it’s generally how SDL_Surface stores the pixels. )

The SDL_Surface structure also holds other data about the texture :

• width/height ( these are read-only )
• the pixel format, stores as an SDL_PixelFormat
• clip_rec, a SDL_Rect used for bliting ( similar to rendering )

These values are useful to know about if you want to create your own SDL_Surfaces using code or want to use the old form of rendering ( bliting ). I do, however, not recommend learning about it. Bliting is less intuitive and it uses only software rendering. This basically means that the CPU will be doing the rendering, something CPUs are really bad at. We want optimized hardware rendering on the GPU. And that’s where the second struct comes in.

### SDL_Texture

Like SDL_Surface, SDL_Texture holds texture data. But unlike SDL_Surface, SDL_Texture holds an optimized, driver specific representation of the pixel data. This means rendering will be executed on the GPU, where it belongs. And THAT means it is really, really fast!

So what’s the point of SDL_Surfaces?

Well, as I said, the pixel data in SDL_Texture is optimized. And what’s more, it can be very different depending on your driver ( nVidia vs ATI. ) Basically this means that you can’t use the pixel data for anything other than rendering. A second reason will come up when we dive into another new part of SDL, namely image loading.

Loading a BMP image in SDL is very easy. It can be done using the following function

Parameters

• file – the file we want to load

Return value

The loaded image as a SDL_Surface. null if failed

### Converting SDL_Surface to SDL_Texture

We’re not gonna use the SDL_Surface*, we want a SDL_Texture* instead. To get it, we need to use a second function :

Parameters

• renderer – our SDL_Renderer
• surface – the surface we want to make a SDL_Texture from

Return value

The resulting SDL_Texture. null if failed.

Since we won’t be using the SDL_Surface, we can delete it and free the memory :

Parameters

• surface – the SDL_Surface to delete

Now that all of this is in place, we can wrap it all up in a nice little function :

# Getting the images on screen

Now that we have loaded the textures, we need to render then on screen. That means no more SDL_RenderFillRect() and THAT means no more rectangles and squares. Finally! To render them, we just need a simple function :

Parameters

• renderer – the SDL_Renderer we always use for rendering
• texture – the SDL_Texture we want to render
• srcrect – which part of the SDL_Texture to render. null for everything.
• dstrect – where to render it. Used exactly like in SDL_RenderFillRect)

Return value

0 on success

Even though this function has a few parameters, it’s really quite simple. We can use nullptr for srcrect and the SDL_Rects we used for SDL_RenderFillRect() as dstrect. And then we can remove the SDL_SetRenderDrawColor and end up with a shorter Render() function.

# Putting it all together

I’m not gonna put the entire code on the blog anymore since this creates a whole wall of text to scroll through. And now there are images you’ll need too. But you can download the images and the source code here.

Feel free to comment if you have anything to say or ask questions if anything is unclear. I always appreciate getting comments.

You can also email me : olevegard@headerphile.com

## 4 thoughts on “[ SDL2 – Part 6 ] Using SDL_Textures”

1. Eric says:

As i understand SDL_Surface and SDL_Texture are just 2d images and structs what contain information about images(correct me if i am wrong).What is diffrence between them and why to use function to convert from surface to texture if they are the same thing? Maybe its faster and something with memory?

Thanks

1. olevegard says:

Hello 🙂

Yes, SDL_Surface is more or less just struct containing pixel data in a raw format. See https://wiki.libsdl.org/SDL_Surface

While SDL_Texture  is a more efficient representation of the data. It is driver-specific so we need to let SDL handle the conversion using the conversion function. See https://wiki.libsdl.org/SDL_Texture

In general you want to use SDL_Texture for rendering. But you can’t get access to the pixel data with SDL_Texture. At least not in a platform-independent way. With SDL_Surface you can’t get access to the raw pixel data, along with some metadata like width and height

1. Eric says:

I have read your post about png files.Now i dont understand why to ever use SDL_Surface if you never will use bmp files if you can load png files(and other) with texture directly?Is SDL_Surface used somethere else?

1. olevegard says:

SDL_Surface was used before SDL 2, there is no SDL_Texture in the old SDL.

There really isn’t much use for SDL_Surface anymore, unless you need access to the raw pixel data. I’ll probably write more about this when I get into using textures with OpenGL


text:
# Adding a Mirror Server to Database

This tiny post shows how to add a server titled Test with a URL google.com. Here is the confirmation screen with the entry added!


text:
# Is AES-GCM suitable for per chunk encryption?

I was looking through Google's encryption flow and noticed that they split each file into chunks and then encrypt each chunk individually with AES-GCM with its own key.

Since AES-GCM starts to get vulnerable around $$2^{48}$$ messages (though, some people suggest $$2^{36}$$), how can they keep things secure if they have millions of users uploading files constantly?

I'm new to cryptography, so excuse my ignorance. Does the $$2^{48}$$ limit only actually matter on a per user basis or is it in general? I wanted to do try something similar using AES-CBC with a SecureRandom IV and HMAC for per chunk encryption since you don't have to worry about the collision. However, seeing their encryption flow, I wanted to learn more about what is the proper way of going about things.

• The limit is on a per-key and nonce basis. – forest Jul 25 '19 at 6:48
• Oh, so if you generate an entirely new key for each file, there is absolutely nothing to worry about. Sounds incredibly simple. – Mr_Antivius Jul 25 '19 at 7:53
• Yes. I've wrote an answer to summarize it. – forest Jul 25 '19 at 7:56


text:
# Water flow rate equation. HELP

1. Mar 6, 2013

### calbolan

Hi,

Me and 4 others are stumped on our HNC Electrical Project. We need an equation that calculates from the flow rate of water and diameter of a pipe, what amount of electrical power outage can be gotten by using a simple turbine connected to the pipe.

Any sort of help would be greatly appreciated as we are more than struggling with the whole of this project.

Regards,

Cal

2. Mar 6, 2013

### deep838

I guess Bernoulli's principle could be a starting point if velocity is required...
It states that the sum of the potential energy, kinetic energy and the pressure energy is constant...
So:
$\frac{1}{2}$mv2 + mgh + PV = constant

So, if the initial energy be known, we can compute the velocity and hence the rate at which the water is flowing.

3. Mar 6, 2013

### rude man

Mass flow rate = dm/dt = ρ dV/dt = ρ v A, solve for v.

v = flow velocity along pipe in m/s
ρ = density, kg/m^3
A = pipe area in m^2
dm/dt = mass flow rate in kg/s
dV/dt = volumetric flow rate in m^3/s = vA

So in 1s the delivered K.E. would be 1/2 dm/dt v^2

Make sense? Not my main field but seems straightforward.

4. Mar 6, 2013

### InquisitiveOne

Hey Cal,

Per the forum rules, I can not offer any help without proof that you've attempted to figure it out on your own. Perhaps you can share some specific details about your inquiry and particular steps you've taken to solve your question?


text:
# Why is the remainder function $R_{n}(x)$ decreasing?

When solving questions like these:

Let $f(x)$ be a real function. Find $f(0.1)$ using its Taylor expansion such that the error is less than $10^{-3}$. Find the lowest degree of Taylor polynomial needed.

(if someone can rephrase the question so its more clear that would be great. I didn't quite nail the translation to English)

We were explained that usually the process of solving this is finding some degree that works. Then, depending on how 'far' you are from the error term, you start trying lower degrees. When some degree doesn't work anymore, you say the one before it is the minimal.

I was wondering though, why the implicit assumption that the remainder function is decreasing? i.e. if degree $k$ doesn't suffice, $1, 2, ..., k-2, k-1$ won't work either. Our professor said that we can rely on this because most functions we're dealing with comply with this property. Why is that?

-
 Is this a question from Zorich's analysis text? – Chao Xu Dec 21 '10 at 22:48 no, just something that got me curious. – daniel.jackson Dec 30 '10 at 16:17

Suppose $f \in C^k(I)$ for some open interval $I$. Let $a,b \in I$ and $M$ be numbers such that $|f^{(n+1)}(t)| \leq M$ for all $t$ between $a$ and $b$. Then we have that $$|R_n f(b)| \leq \frac{M}{(n+1)!} |b-a|^{n+1}.$$
Obviously you'll want $|b-a| < 1$ which you almost always can arrange for. Now if $f$ is analytic (and thus equal to its own Taylor series), we can use the third of these alternate characterizations to see that the approximations get better. This should give you a good idea of how the approximations might get worse.


text:
# What Is a Tensor? The mathematical point of view.

Let me start with a counter-question. What is a number? Before you laugh, there is more to this question than one might think. A number can be something we use to count or more advanced an element of a field like the real numbers. Students might answer that a number is a scalar. This is the appropriate answer when vector spaces are around. But what is a scalar? A scalar can be viewed as the coordinate of a one-dimensional vector space, the component of a basis vector. It means we stretch or compress a vector. But this manipulation is a transformation, a homomorphism, a linear mapping. So the number represents a linear mapping of a one-dimensional vector space. It also transports other numbers to new ones. Thus it is an element of ##\mathbb{R}^*##, the dual space: ##c \mapsto (a \mapsto \langle c,a \rangle##). Wait! Linear mapping? Aren’t those represented by matrices? Yes, it is a ##1 \times 1## matrix and even a vector itself.
So without any trouble, we have already found that a number is

• An element of a field, e.g. ##\mathbb{R}##.
• A scalar.
• A coordinate.
• A component.
• A transformation of other numbers, an element of a dual vector space, e.g. ##\mathbb{R}^*##
• A matrix.
• A vector.

As you might have noticed, we can easily generalize these properties to higher dimensions, i.e. arrays of numbers, which we usually call vectors and matrices. I could as well have asked: What is a vector, what a matrix? We would have found even more answers, as matrices can be used to solve systems of linear equations, some form matrix groups, others play an important role in calculus as Jacobi matrices, and again others are number schemes in stochastic. In the end, they are only two-dimensional arrays of numbers in a rectangular shape. A number is even the one-dimensional special case of the two-dimensional array matrix.

This sums up the difficulties when we ask: What is a tensor? Depending on whom you ask, how much room and time there is for an answer, where the emphases lie, or what you want to use them for, the answers may vary significantly. In the end, they are only multi-dimensional arrays of numbers in a rectangular shape.1)  2).

\begin{equation*}
\begin{aligned}
\label{Ex-I}
\begin{bmatrix}
2
\end{bmatrix}
&\;
&\begin{bmatrix}
1\\1
\end{bmatrix}
&\;
&\begin{bmatrix}
0& -1\\1&0
\end{bmatrix}
&\;
\\
scalar &\;  & vector &\;  & matrix
\\
-&\;  & (1,0)\; tensor &\;  & (2,0)\; tensor
\end{aligned}
\end{equation*}

##(3,0)\; tensor##

Many students are used to dealing with scalars (numbers, mass), vectors (arrows, force), and matrices (linear equations, Jacobi-matrix, linear transformations, covariances). The concept of tensors, however, is often new to them at the beginning of their study of physics. Unfortunately, they are as important in physics as scalars, vectors, and matrices are. The good news is, they aren’t any more difficult than the former. They only have more coordinates. This might seem to go to the expense of clarity, but there are methods to deal with it. E.g. a vector also has more coordinates than a scalar. The only difference is, that we can sketch an arrow, whereas sketching an object defined by a cube of numbers is impossible. And as we can do more with matrices, than we can do with scalars, we can do even more with tensors, because a cube of numbers, or even higher dimensional arrays of numbers, can represent a lot more than simple scalars and matrices can. Furthermore, scalars, vectors, and matrices are also tensors. This is already the entire secret about tensors. Everything beyond this point is methods, examples and language, in order to prepare for how tensors can be used to investigate certain objects.

## Definitions

As variable as the concept of tensors is as variable are possible definitions. In coordinates, a tensor is a multi-dimensional, rectangular scheme of numbers: a single number as a scalar, an array as a vector, a matrix as a linear function, a cube as a bilinear algorithm, and so on. All of them are tensors, as a scalar is a special case of a matrix, all these are special cases of a tensor. The most abstract formulation is: A tensor ##\otimes_\mathbb{F}## is a binary covariant functor that represents a solution for a co-universal mapping problem on the category of vector spaces over a field ##\mathbb{F}\, [3].## It is a long way from a scheme of numbers to this categorical definition. To be of practical use, the truth lies – as so often – in between. Numbers don’t mean anything without basis, and categorial terms are useless in an everyday business where coordinates are dominant.

Definition: A tensor product of vector spaces ##U \otimes V## is a vector space structure on the Cartesian product ##U \times V## that satisfies

\label{Tensor Product}
\begin{aligned}
(u+u’)\otimes v &= u \otimes v + u’ \otimes v\\
u \otimes (v + v’) &= u \otimes v + u \otimes v’\\
\lambda (u\otimes v) &= (\lambda u) \otimes v = u \otimes (\lambda v)
\end{aligned}

This means a tensor product is a freely generated vector space of all pairs ##(u,v)## that satisfies some additional conditions such as linearity in each argument, i.e. bilinearity, which justifies the name product. Tensors form a vector space as matrices do. The tensor product, however, must not be confused with the direct sum ##U \oplus V## which is of dimension ##\operatorname{dim} U +\operatorname{dim} V## as a basis would be ##\{(u_i,0)\, , \,(0 , v_i)\}##, whereas in a tensor product ##U \otimes V##, all basis vectors ##(u_i,v_j)## are linearly independent and we get  the dimension ##\operatorname{dim} U \cdot \operatorname{dim} V##. Tensors can be added and multiplied by scalars. A tensor product is not commutative even if both vector spaces are the same. Now obviously it can be iterated and the vector spaces could as well be dual spaces or algebras. In physics, tensors are often a mixture of several vector spaces and several dual spaces. It also makes sense to sort both kinds as the tensor product isn’t commutative.

Definition: A tensor ##T_q^p## of type ##(p,q)## of ##V## with ##p## contravariant and ##q## covariant components is an element (vector) of
$$\mathcal{T}(V^p;V^{*}_q) = \underbrace{ V\otimes\ldots\otimes V}_{p- times}\otimes\underbrace{ V^*\otimes\ldots\otimes V^*}_{q-times}$$
By (1) this tensor is linear in all its components.

## Examples

From a mathematical point of view, it doesn’t matter whether a vector space ##V## or its dual ##V^*## of linear functionals is considered. Both are vector spaces and a tensor product in this context is defined for vector spaces. So we can simply say

• A tensor of rank ##0## is a scalar: ##T^0 \in \mathbb{R}##.
• A tensor of rank ##1## is a vector: ##T^1 = \sum u_i##.
• A tensor of rank ##2## is a matrix: ##T^2 = \sum u_i \otimes v_i##.
• A tensor of rank ##3## is a cube: ##T^3 = \sum u_i \otimes v_i \otimes w_i##.
• A tensor of rank ##4## is a ##4##-cube and we run out of terms for them: ##T^4 = \sum u_i \otimes v_i \otimes w_i \otimes z_i##.
• ##\ldots## etc.

If we build ##u \otimes v## in coordinates we get a matrix. Say ##u = (u_1,\ldots ,u_m)^\tau## and ##v = (v_1,\ldots , v_n)^\tau##. Then
$$u \otimes v = u \cdot v^\tau = \begin{bmatrix} u_1v_1& u_1v_2 & u_1v_3 & \ldots & u_1v_n\\ u_2v_1& u_2v_2 & u_2v_3 & \ldots & u_2v_n\\ u_3v_1& u_3v_2 & u_3v_3 & \ldots & u_3v_n\\ \vdots & \vdots & \vdots & \ldots & \vdots \\ u_nv_1& u_nv_2 & u_nv_3 & \ldots & u_nv_n \end{bmatrix}$$

Note that this is the usual matrix multiplication, row times column. But here the first factor are ##m## rows of length ##1## and the second factor are ##n## columns of length ##1##. It also means that this matrix is a matrix of rank one since it consists of different multiples of a single row vector ##v^\tau##. To write an arbitrary ##n \times n## matrix ##A## as a tensor, we need ##n## of those dyadic tensors, i.e.
$$A = \sum_{i=1}^n u_i \otimes v_i$$
A generic “cube” ##u \otimes v \otimes w## will get us a “rank ##1## cube” as different multiples of a rank ##1## matrix stacked to a cube. An arbitrary “cube” would be a sum of these. And this procedure isn’t bounded by dimensions. We can go on and on. Only thing is, that already “cube” was a bit of a crutch to describe a three-dimensional array of numbers and we run out of words other than tensor. A four-dimensional version (tensor) could be viewed as the tensor product of two matrices, which themselves are tensor products of two vectors and always sums of them.

Let us consider now arbitrary ##2 \times 2## matrices ##M## and order their entries such that we can consider them as vectors, because ##\mathbb{M}(2,2)## is a vector space. Say ##(M_{11},M_{12},M_{21},M_{22})##. Then we get in

\begin{equation*} \begin{aligned}
M \cdot N &= \begin{bmatrix} M_{11}&M_{12} \\ M_{21}&M_{22}
\end{bmatrix} \cdot \begin{bmatrix} N_{11}&N_{12} \\ N_{21}&N_{22} \end{bmatrix} \\ & \\ &= \begin{bmatrix}M_{11}\cdot N_{11}+M_{12} \cdot N_{21} &M_{11} \cdot N_{12}+M_{12} \cdot N_{22} \\ M_{21}\cdot N_{11}+M_{22} \cdot N_{21} & M_{21} \cdot N_{12}+M_{22} \cdot N_{22} \end{bmatrix}\\ & \\
&= (\sum_{\mu =1}^{7} u_{\mu }^* \otimes v_{\mu }^* \otimes W_{\mu })(M,N) = \sum_{\mu =1}^{7} u_{\mu}^*(M) \cdot v_{\mu}^*(N) \cdot W_{\mu}\\ & \\ &= ( \begin{bmatrix} 1\\0 \\0 \\1
\end{bmatrix}\otimes \begin{bmatrix} 1\\0 \\0 \\1
\end{bmatrix} \otimes \begin{bmatrix} 1\\0 \\0 \\1
\end{bmatrix} + \begin{bmatrix} 0\\0 \\1 \\1
\end{bmatrix}\otimes \begin{bmatrix} 1\\0 \\0 \\0
\end{bmatrix} \otimes \begin{bmatrix} 0\\0 \\1 \\-1
\end{bmatrix}\\ & \\ & +  \begin{bmatrix} 1\\0 \\0 \\0
\end{bmatrix}\otimes \begin{bmatrix} 0\\1 \\0 \\-1
\end{bmatrix} \otimes \begin{bmatrix} 0\\1 \\0 \\1
\end{bmatrix} + \begin{bmatrix} 0\\0 \\0 \\1
\end{bmatrix}\otimes \begin{bmatrix}-1\\0 \\1 \\0
\end{bmatrix} \otimes \begin{bmatrix} 1\\0 \\1 \\0
\end{bmatrix}\\ & \\ &+ \begin{bmatrix} 1\\1 \\0 \\0
\end{bmatrix}\otimes \begin{bmatrix} 0\\0 \\0 \\1
\end{bmatrix} \otimes \begin{bmatrix}-1\\1 \\0 \\0
\end{bmatrix} + \begin{bmatrix}-1\\0 \\1 \\0
\end{bmatrix}\otimes \begin{bmatrix} 1\\1 \\0 \\0
\end{bmatrix} \otimes \begin{bmatrix} 0\\0 \\0 \\1
\end{bmatrix}\\ & \\ &+ \begin{bmatrix} 0\\1 \\0 \\-1
\end{bmatrix}\otimes \begin{bmatrix} 0\\0 \\1 \\1
\end{bmatrix} \otimes \begin{bmatrix} 1\\0 \\0 \\0
\end{bmatrix} ).(M,N) \end{aligned} \end{equation*}

a matrix multiplication of ##2 \times 2## matrices which only needs seven generic multiplications ##u_{\mu}^*(M) \cdot v_{\mu}^*(N) ## to the expense of more additions. This (bilinear) algorithm is from Volker Strassen ##[1]##. It reduced the “matrix exponent” from ##3## to ##\log_2 7 = 2.807## which means matrix multiplication can be done with ##n^{2.807}## essential multiplications instead of the obvious ##n^3## by simply multiplying rows and columns. The current record holder is an algorithm from  François Le Gall (2014) with an upper bound of ##O(n^{2.3728639}) [5]##. For sake of completeness let me add, these numbers are true for large ##n## and they start with different values of ##n##. For ##n=2## Strassen’s algorithm is already optimal. One cannot use less than seven multiplications to calculate the product of two ##2 \times 2 ## matrices. For larger matrices, however, there are algorithms with fewer multiplications. Whether these algorithms can be called efficient or useful is a different discussion. I once have been told that Strassen’s algorithm had been used in cockpit software, but I’m not sure if this is true.

This example shall demonstrate the following points:

• The actual presentation of tensors depends on the choice of basis as well as it does for vectors and matrices.
• Strassen’s algorithm is an easy example of how tensors can be used as mappings to describe certain objects. The set of all those algorithms for this matrix multiplication form in fact an algebraic variety, i.e. a geometrical object.
• Tensors can be used for various applications, not necessarily only in mathematics and physics, here in computer science.
• The obvious, here “Matrix multiplication of ##2 \times 2## matrices needs ##8## generic multiplications.” isn’t necessarily the truth. Strassen saved one.
• A tensor itself is a linear combination of let’s say generic tensors of the form ##v_1 \otimes \ldots \otimes v_m##. In the case of ##m=1## one doesn’t actually speak of tensors, but of vectors instead, although strictly speaking they would be called monads. In case ##m=2## these generic tensors are called dyads and in case ##m=3## triads.
• One cannot simplify the addition of generic tensors, it remains a formal sum. The only exception  for multilinear objects is always
$$u_1 \otimes v \otimes w + u_2 \otimes v \otimes w = (u_1 +u_2) \otimes v \otimes w$$
where all but one factor are identical in which case we know it as distributive property.
• Matrix multiplication isn’t commutative. So we are not allowed the swap the ##u_\mu^*## and ##v_\mu^*## in the above example, i.e. a tensor product isn’t commutative either.
• Tensors according to a given basis are number schemes. Which meaning we attach to them depends on our purpose.

However, these schemes of numbers called tensors can stand for a lot of things: transformations, algorithms, tensor algebras, or tensor fields. They can be used as a construction template for Graßmann algebras, Clifford algebras, or Lie algebras, because of their (co-)universal property. They occur at really many places in physics, e.g. stress-energy tensor, Cauchy stress tensor, metric tensor, or curvature tensors as the Ricci tensor, just to name a few. Not bad for some numbers ordered in multidimensional cubes. This only reflects, what we’ve already experienced with matrices. As a single object, they are only some numbers in rectangular form. But we use them from solving linear equations as well as to describe the fundamental forces in our universe.

## Sources

1. Strassen, V., Gaussian elimination is not optimal, 1969, Numer. Math. (1969) 13: 354. doi:10.1007/BF02165411
2. Werner Greub, Linear Algebra, Springer Verlag New York Inc., 1981, GTM 23
https://www.amazon.com/Linear-Algebra-Werner-Greub/dp/8184896336
3. Götz Brunner, Homologische Algebra, Bibliografisches Institut AG Zürich, 1973
4. Maximillian Ganster, Graz University of Technology, Lecture Notes Summer 2010, Vektoranalysis,\\
https://www.math.tugraz.at/\~ganster/lv\_vektoranalysis\_ss\_10/\\
20\_ko-\_und\_kontravariante\_darstellung.pdf
5. François Le Gall, 2014, Powers of Tensors and Fast Matrix Multiplication, https://arxiv.org/abs/1401.7714

##\underline{Footnotes:}##

1) Tensors don’t need to be of the same size in every dimension, i.e. don’t have to be built from vectors of the same dimension, so the examples below are already a special case even though the standard case in the sense that quadratic matrices appear more often than rectangular ones. ##\uparrow##

2) One might call a scalar a (0,0) tensor, but I will leave this up to the logicians. ##\uparrow##

58 replies
1. FactChecker says:
Thuring

This cut from Wikipedia shows a motive of using tensors:

"Because they express a relationship between vectors, tensors themselves must be independent of a particular choice of basis. The basis independence of a tensor then takes the form of a covariant and/or contravariant transformation law that relates the array computed in one basis to that computed in another one. "

I believe this might be one of the most important characteristics of tensors for differential geometry and general relativity. (both essentially over my head)

Thanks for taking the time and effort to write this article.I agree that this is the key feature of a tensor. It is an entity that is defined in such a way that its representations in different coordinate systems satisfy the covariant/contravariant transformation rules. Mathematically, a tensor can be considered an equivalence class of coordinate system representations that satisfy the covariant/contravariant transformation rules. This gives tensors the great advantage of being coordinate system agnostic.

2. Thuring says:

This cut from Wikipedia shows a motive of using tensors:

"Because they express a relationship between vectors, tensors themselves must be independent of a particular choice of basis. The basis independence of a tensor then takes the form of a covariant and/or contravariant transformation law that relates the array computed in one basis to that computed in another one. "

I believe this might be one of the most important characteristics of tensors for differential geometry and general relativity. (both essentially over my head)

3. WWGD says:
Deepak Solanki

"A scalar can be viewed as the coordinate of one dimensional vector space, the component of a basis Vector."
Respected Sir,
can you please explain this statement that you made in your answer?Think of the Reals as a vector space over itself. Then any vector/Real number is a multiple of any non-zero number. Generalize this to any other 1D v. space over the Reals.

4. fresh_42 says:
Deepak Solanki

"A scalar can be viewed as the coordinate of one dimensional vector space, the component of a basis Vector."
Respected Sir,
can you please explain this statement that you made in your answer?If we have a ##1-##dimensional vector space ##V## with a basis vector ##vec{b}##, then all vectors ##vec{v}## can be written ##vec{v}=c cdot vec{b}##. This means ##c## is the scalar, which transforms ##vec{b}## to ##vec{v}##, the coordinate of ##vec{v}## in the basis ##{vec{b}}## and the component of ##vec{v}## with respect to ##vec{b}##. And it constitutes an isomorphism ##c leftrightarrow vec{v}## between the field ##mathbb{F}## and ##V##.

5. Deepak Solanki says:

"A scalar can be viewed as the coordinate of one dimensional vector space, the component of a basis Vector."
Respected Sir,

6. lavinia says:

An clear exposition of the Physics approach to tensors is in Leonard Susskind's Lectures on General Relativity starting somewhere around minute 40 in lecture 3.

7. lavinia says:

If I understand the point: if one writes a vector in terms of a basis then its coefficients are picked out by the dual basis. So the coefficients are contravariant.

8. burakumin says:

Concerning this point:

lavinia

Given a linear map between two vector spaces ##L:V →W## then ##L## determines a map of the algebra of tensor products of vectors in ##V## to the algebra of tensor products of vectors in ##W##. This is correspondence is a covariant functor. ##L## also determines a map of the algebra of tensor products of dual vectors in ##W## to the algebra of tensor products of dual vectors in ##V##. This correspondence is a contravariant functor.

One might guess that this is the reason for the terms covariant and contravariant tensor though I do not know the history.

fresh_42

I agree. This would be a natural way to look at it. However, the German Wikipedia does it the other way around and the English speaks of considering ##V## as ##V^{**}## and refers to basis transformations as the origin of terminology. I find this a bit unsatisfactory as motivation but failed to find a good reason for a different convention.This is what Laurent Shwartz writes in "Les Tenseurs" in 1975:
Ces règles sont bien commodes pour les calculs techniques, mais elles ont pour base une erreur historique, qui n'a pas fini de canuler l'humanité pour plusieurs siècles. Elles furent établies à une époque où on manipulait plus les coordonnées que les vecteurs. Elles aboutissent ainsi à appeler contravariant (contra = contre) ce qui est relatif à ##E##, covariant (co = avec) ce qui est relatif à ##E^*## !! Dans tous les raisonnements théoriques utilisant des produits tensoriels (et ils couvrent aujourd'hui toutes les mathématiques), c'est une catastrophe. Un vecteur de ##E## (resp. ##E^*##) est appelé tenseur contravariant (resp. covariant) ! Ce qui est vrai (et c'est de là que vient l'apellation) c'est que le système de coordonnées d'un vecteur (i.e. "le tenseur ##x^i = langle epsilon^i, x rangle##", ##epsilon^i## formant la base duale) est contravariant ; mais, dans les mathématiques modernes, un vecteur est autre chose que le système de ses coordonnées ! Il aurait fallu appeler tenseur covariant un élément de ##E##, tenseur contravariant un élément de ##E^*##, quitte à faire remarquer que les coordonnées varient en sens inverse.which can be translated by:
These rules are very convenient for technical calculations, but they are based on a historical error, which will continue to play a joke on humanity for several centuries. They were established at a time when coordinates were manipulated more than vectors. They results in calling contravariant (contra = against) what is relative to ##E##, covariant (co = with), which is relative to ##E ^ *## !! In every theoretical reasoning using tensorial products (and they cover all mathematics today), it is a catastrophe. A vector of ##E## (respectively ##E ^ *##) is called a contravariant tensor (respectively a covariant tensor)! What is correct (and this is the origin of such a terminology) is that the system of coordinates of a vector (ie, the tensor ##x^i = langle epsilon^i, x rangle##", ##epsilon^i## being the dual basis) is contravariant; But in modern mathematics a vector is something else than the system of its coordinates! An element of ##E## should have been called covariant tensor, an element of ##E ^ *## contravariant tensor, even if we point out that the coordinates vary in the opposite direction.

9. WWGD says:
stevendaryl

Isn't this just a matter of convention? If you have a tensor $t$ of type $V otimes V^* otimes V$, anything you want to do with $t$, you can do the analogous thing with the tensor $t'$ of type $V otimes V otimes V^*$. There is only a notational difficulty, which is indicating which arguments of one tensor are contracted with which other arguments of a different tensor. But the Einstein summation convention makes this explicit. I meant not just for contraction but for describing the general type ( co- and contra- variant) of the tensor; I was wondering if a tensor with mixed components , like ## V otimes V^{*} otimes V otimes V^{*}… ## could always be expressible as ## V otimes V otimes …V^{*} otimes V^{*}…. ## ., though I agree that when contracting the order does not matter. Basically, could we use contraction to show the two above types are equivalent? I am being kind of lazy, let me try it.

10. stevendaryl says:
WWGD

Is there a reason why we group together the (contra/co) variant factors? Why not have , e.g., ## T^p_q = V otimes V^{*} otimes V… ## , etc ?Isn't this just a matter of convention? If you have a tensor $t$ of type $V otimes V^* otimes V$, anything you want to do with $t$, you can do the analogous thing with the tensor $t'$ of type $V otimes V otimes V^*$. There is only a notational difficulty, which is indicating which arguments of one tensor are contracted with which other arguments of a different tensor. But the Einstein summation convention makes this explicit.

11. fresh_42 says:

I listed my originally intended chapters here:
where universality, natural isomorphisms and what else comes to mind considering tensors would have been included, but this tended to became about 40-50 pages and I wasn't really prepared for such a long explanation … And after this debate here, I'm sure that even then there would have been some who thought I left out an essential part or described something differently from what they are used to and so on. Would have been interesting to learn more about the physical part of it, the more as a tensor to me is merely a multilinear product, which only gets interesting if a subspace is factored out. If there only wasn't these coordinate transformations and indices wherever you look. :wideeyed:

12. WWGD says:

I don't know if you mentioned this, but I think another useful perspective here is that the tensor product also defines a map taking a k-linear map into a linear map ( on the tensor product ; let's stick to vector spaces over ## mathbb R ## and maps into the Reals, to keep it simple for now) , so that there is a map taking, e.g., the dot product ( as a bilinear map, i.e., k=2 ) on ## mathbb R^2 times mathbb R^2 ## into a linear map defined on ## mathbb R^2 otimes mathbb R^2 ## ( Into the Reals, in this case ), so we have a map from {## K :V_1 times V_2 times…times V_k ##} to {## L:V_1 otimes V_2 otimes…otimes V_k ##} , where K is a k-linear map and L is linear. This perspective helps me understand things better.

13. fresh_42 says:

Say we have a map ##V otimes V^* otimes V = V_1 otimes V^* otimes V_2 longrightarrow W##, then it is an element of ##V_1 otimes V^* otimes V_2 otimes W## which could probably be grouped as ##V^* otimes V_1 otimes V_2 otimes W## and we have the original grouping again. I don't know of an example, where the placing of ##V^*## depends on the fact, that it is in between the copies of ##V##. As soon as algebras play a role, we factor their multiplication rules anyway. Or even better in a way such that the contravariance of ##W## is respected.

14. WWGD says:
fresh_42

Perhaps if you consider tensor algebras of ##operatorname{Hom}(V,V^*)## or similar. I would group them pairwise in such a case: all even indexed ##V## and all odd indexed ##V^*##. This is what I really learnt about tensors: it all heavily depends on what you want to do.Maybe we are referring to different things, but if we have a multilinear map defined on , say, ## V otimes V^{*} otimes V ## then the map would be altered, wouldn't it?

15. fresh_42 says:
WWGD

Thanks, but aren't there naturally-occurring tensors in which the factors are mixed? What do you then do?Perhaps if you consider tensor algebras of ##operatorname{Hom}(V,V^*)## or similar. I would group them pairwise in such a case: all even indexed ##V## and all odd indexed ##V^*##. This is what I really learnt about tensors: it all heavily depends on what you want to do.

16. fresh_42 says:
StoneTemplePython

It probably should be noted that when moving from a 2-D matrix to something like a 3-D or 4-D (or n-D) tensor, is a bit like moving from 2-SAT to 3-SAT… most of the interesting things you'd want to do computationally (e.g. numerically finding eigenvalues or singular values) become NP Hard ( E.g. see: https://arxiv.org/pdf/0911.1393.pdf )Yes, interesting, isn't it? This tiny difference between ##2## and ##3## which decides, whether we're too stupid to handle those problems, or whether there is a system immanent difficulty. And lower bounds are generally hard to prove. I know that Strassen lost a bet on ##NP = P##. I've forgotten the exact year, but he thought we would have found out somewhere in the 90's. But I guess he enjoyed the journey in a balloon over the Alps anyway.

17. WWGD says:
fresh_42

The grouping allows a far better handling. There is no advantage in mixing the factors, so why should it be done? Perhaps in case where one considers tensors of ##V = U otimes U^*##. The applications I know are all for low values of ##p,q## and it only matters how the application of a tensor is defined on another object. Formally one could even establish a bijection like the transposition of matrices. But all of this only means more work in writing without any benefits. E.g. Strassen's algorithm can equally be written as ##sum u^*otimes v^* otimes W## or ##sum W otimes u^*otimes v^*##. Only switching ##u^*,v^*## would make a difference, namely between ##Acdot B## and ##B cdot A##.

I once calculated the group of all ##(varphi^*,psi^*,chi)## with ##[X,Y]=chi([varphi(X),psi(Y)])## for all semisimple Lie algebras. Nothing interesting except that ##mathfrak{su}(2)## produced an exception – as usual. But I found a pretty interesting byproduct for non-semisimple Lie algebras. Unfortunately this excludes physics, I guess.Thanks, but aren't there naturally-occurring tensors in which the factors are mixed? What do you then do?

18. fresh_42 says:
WWGD

Is there a reason why we group together the (contra/co) variant factors? Why not have , e.g., ## T^p_q = V otimes V^{*} otimes V… ## , etc ?The grouping allows a far better handling. There is no advantage in mixing the factors, so why should it be done? Perhaps in case where one considers tensors of ##V = U otimes U^*##. The applications I know are all for low values of ##p,q## and it only matters how the application of a tensor is defined on another object. Formally one could even establish a bijection like the transposition of matrices. But all of this only means more work in writing without any benefits. E.g. Strassen's algorithm can equally be written as ##sum u^*otimes v^* otimes W## or ##sum W otimes u^*otimes v^*##. Only switching ##u^*,v^*## would make a difference, namely between ##Acdot B## and ##B cdot A##.

I once calculated the group of all ##(varphi^*,psi^*,chi)## with ##[X,Y]=chi([varphi(X),psi(Y)])## for all semisimple Lie algebras. Nothing interesting except that ##mathfrak{su}(2)## produced an exception – as usual. But I found a pretty interesting byproduct for non-semisimple Lie algebras. Unfortunately this excludes physics, I guess.

19. StoneTemplePython says:

I liked this article. I am well aware of the proof of correctness of Strassen's algorithm, but had never seen where the idea came from — nice.

It occurs to me that if people are only interested in certain properties of higher rank tensors and they don't want the object to jump off the page, they may be interested in things like Kronecker products or wedge products.

It probably should be noted that when moving from a 2-D matrix to something like a 3-D or 4-D (or n-D) tensor, is a bit like moving from 2-SAT to 3-SAT… most of the interesting things you'd want to do computationally (e.g. numerically finding eigenvalues or singular values) become NP Hard ( E.g. see: https://arxiv.org/pdf/0911.1393.pdf )

20. scottdave says:

I learned about tensors in college – fluids or thermodynamics, maybe, I cannot recall for sure. I "sort of" got it, but later on in life, I came across this video, which I found useful.

21. WWGD says:
lavinia

One has the isomorphism between ##V## and ##V^{**}##, ##v→v^{**}## ,defined by ##v^{**}(w) = w(v)##.Yes, but AFAIK is not a natural isomorphism, meaning it is not basis-independent. I wonder to what effects/ when this makes a difference.

22. lavinia says:
WWGD

I don't know if this matters in terms of equating the two, but the isomorphism between ## V , V^{**} ## is not a natural one.One has the isomorphism between ##V## and ##V^{**}##, ##v→v^{**}##, defined by ##v^{**}(w) = w(v)##.

23. WWGD says:
lavinia

I think I said the same thing. The covariant factors are the tensor products of the vectors, the contravariant are the tensors of the dual vectors. Is there a reason why we group together the (contra/co) variant factors? Why not have , e.g., ## T^p_q = V otimes V^{*} otimes V… ## , etc ?

24. WWGD says:
fresh_42

I agree. This would be a natural way to look at it. However, the German Wikipedia does it the other way around and the English speaks of considering ##V## as ##V^{**}## and refers to basis transformations as the origin of terminology. I find this a bit unsatisfactory as motivation but failed to find a good reason for a different convention.I don't know if this matters in terms of equating the two, but the isomorphism between ## V , V^{**} ## is not a natural one.

25. lavinia says:
fresh_42

I agree. This would be a natural way to look at it. However, the German Wikipedia does it the other way around and the English speaks of considering ##V## as ##V^{**}## and refers to basis transformations as the origin of terminology. I find this a bit unsatisfactory as motivation but failed to find a good reason for a different convention.In Physics a contravariant vector is thought of as a displacement dx. In Mathematics this corresponds to a 1 form and at each point in space this is a dual vector to the vector space of tangent vectors.

In primitive terms one does not think of the tangent space as its double dual.

26. fresh_42 says:
lavinia

I think I said the same thing. The covariant factors are the tensor products of the vectors, the contravariant are the tensors of the dual vectors.I agree. This would be a natural way to look at it. However, the German Wikipedia does it the other way around and the English speaks of considering ##V## as ##V^{**}## and refers to basis transformations as the origin of terminology. I find this a bit unsatisfactory as motivation but failed to find a good reason for a different convention.

27. lavinia says:
fresh_42

Yes, but one could as well say ##T_q^p(V) = underbrace{V otimes ldots otimes V}_{p-times} otimes underbrace{V^* otimes ldots otimes V^*}_{q-times}## has ##p## covariant factors ##V## and ##q## contravariant factors ##V^*## and in this source
http://www.math.tu-dresden.de/~timmerma/texte/tensoren2.pdf (see beginning of section 2.1)
it is done. So what are the reasons for one or the other? The fact which are noted first? Are the first ones always considered contravariant? As someone who tends to confuse left and right I was looking for some possibility to remember a convention, one or the other. So I'm still looking for a kind of natural, or if not possible, at least a canonical deduction.I think I said the same thing. The covariant factors are the tensor products of the vectors, the contravariant are the tensors of the dual vectors.

28. fresh_42 says:
lavinia

Given a linear map between two vector spaces ##L:V →W## then ##L## determines a map of the algebra of tensor products of vectors in ##V## to the algebra of tensor products of vectors in ##W##. This is correspondence is a covariant functor. ##L## also determines a map of the algebra of tensor products of dual vectors in ##W## to the algebra of tensor products of dual vectors in ##V##. This correspondence is a contravariant functor.

One might guess that this is the reason for the terms covariant and contra-variant tensor though I do not know the history.Yes, but one could as well say ##T_q^p(V) = underbrace{V otimes ldots otimes V}_{p-times} otimes underbrace{V^* otimes ldots otimes V^*}_{q-times}## has ##p## covariant factors ##V## and ##q## contravariant factors ##V^*## and in this source
http://www.math.tu-dresden.de/~timmerma/texte/tensoren2.pdf (see beginning of section 2.1)
it is done. So what are the reasons for one or the other? The fact which are noted first? Are the first ones always considered contravariant? As someone who tends to confuse left and right I was looking for some possibility to remember a convention, one or the other. So I'm still looking for a kind of natural, or if not possible, at least a canonical deduction.

29. lavinia says:
fresh_42

Is there a natural way how the ##V's## come up contravariant and the ## V^{*'}s## covariant? Without coordinate transformations?Given a linear map between two vector spaces ##L:V →W## then ##L## determines a map of the algebra of tensor products of vectors in ##V## to the algebra of tensor products of vectors in ##W##. This is correspondence is a covariant functor. ##L## also determines a map of the algebra of tensor products of dual vectors in ##W## to the algebra of tensor products of dual vectors in ##V##. This correspondence is a contravariant functor.

One might guess that this is the reason for the terms covariant and contra-variant tensor though I do not know the history.

30. WWGD says:
stevendaryl

The way that tensors are manipulated implicitly assumes isomorphisms between certain spaces.

If $A$ is a vector space, then $A^*$ is the set of linear functions of type $A rightarrow S$ (where $S$ means "scalar", which can mean real numbers or complex numbers or maybe something else depending on the setting).

The first isomorphism is $A^{**}$ is isomorphic to $A$.

The second isomorphism is $A^* otimes B^*$ is isomorphic to those function of type $(A times B) rightarrow S$ that are linear in both arguments.

So this means that a tensor of type $T^p_q$ can be thought of as a linear function that takes $q$ vectors and $p$ covectors and returns a scalar, or as a function that takes $q$ vectors and returns an element of $V otimes V otimes … otimes V$ ($p$ of them), or as a function that takes $p$ covectors and returns an element of $V^* otimes … otimes V^*$ ($p$ of them), etc.Good point; same is the case with Tensor Contraction, i.e., it assumes/makes use of , an isomorphism.

31. stevendaryl says:

The way that tensors are manipulated implicitly assumes isomorphisms between certain spaces.

If $A$ is a vector space, then $A^*$ is the set of linear functions of type $A rightarrow S$ (where $S$ means "scalar", which can mean real numbers or complex numbers or maybe something else depending on the setting).

The first isomorphism is $A^{**}$ is isomorphic to $A$.

The second isomorphism is $A^* otimes B^*$ is isomorphic to those function of type $(A times B) rightarrow S$ that are linear in both arguments.

So this means that a tensor of type $T^p_q$ can be thought of as a linear function that takes $q$ vectors and $p$ covectors and returns a scalar, or as a function that takes $q$ vectors and returns an element of $V otimes V otimes … otimes V$ ($p$ of them), or as a function that takes $p$ covectors and returns an element of $V^* otimes … otimes V^*$ ($p$ of them), etc.

32. WWGD says:
fresh_42

Sorry, was a bit in "defensive mode".No problem.

33. fresh_42 says:
WWGD

I was replying to someone else's post.Sorry, was a bit in "defensive mode".

34. WWGD says:
fresh_42

It's the freely generated vector space (module) on the set ##U times V##. The factorization indeed guarantees the multilinearity and the finiteness of sums which could as well be formulated as conditions to hold.I was replying to someone else's post.

35. fresh_42 says:
WWGD

I think this is done before the moding out and arranging into equivalence classes is done.It's the freely generated vector space (module) on the set ##U times V##. The factorization indeed guarantees the multilinearity and the finiteness of sums which could as well be formulated as conditions to hold.

36. WWGD says:
burakumin

If I interpret correctly this sentence says the underlying set of U⊗V is U×V. This is not correct. This works for the direct sum U⊕V but the tensor product is a "bigger" set than U×V. One usual way to encode it is to quotient ##mathbb{R}^{(U times V)}## (the set of finitely-supported functions from U×V to ##mathbb{R}##) by the appropriate equivalence relation. I think this is done before the moding out and arranging into equivalence classes is done.

37. WWGD says:

I thought it would be nice to have a good understanding of what a singleton ## a otimes b ## represents in a tensor product. It is one of these things that I have understood and then forgotten many times over.

38. fresh_42 says:
Orodruin

I am pretty sure most engineering students will not remember what a homomorphism is without looking it up.Corrected. Thanks.

39. fresh_42 says:
Orodruin

Perhaps I was mislead regarding the intended audience from the beginning. I am pretty sure most engineering students will not remember what a homomorphism is without looking it up. Certainly a person at B-level cannot be expected to know this?

In the end, I suspect we would give different answers to the question in the title based on our backgrounds and the expected audience. My students would (generally) not prefer me to give them the mathematical explanation, but instead the physical application and interpretation, more to the effect of how I think you would interpret "how can you use tensors in physics?" or "how do I interpret the meaning of a tensor?"Yes, you are right. My goal was really to say "Hey look, a tensor is nothing to be afraid of." and that's why I wrote
Depending on whom you ask, how many room and time there is for an answer, where the emphases lie or what you want to use them for, the answers may vary significantly.And to be honest, I'm bad at basis changes, i.e. frame changes and this whole rising and lowering indices is mathematically completely boring stuff. I first wanted to touch all these questions but I saw, that would need a lot of more space. So I decided to write a simple answer and leave the "several parts" article about tensors for the future. Do you want to know where I gave it up? I tried to get my head around the covariant and contravariant parts. Of course I know what this means in general, but what does it mean here? How is it related? Is there a natural way how the ##V's## come up contravariant and the ## V^{*'}s## covariant? Without coordinate transformations? In a categorial sense, it is again a different situation. And as I've found a source where it was just the other way around, I labeled it "deliberate". Which makes sense, as you can always switch between a vector space and its dual – mathematically. I guess it depends on whether one considers ##operatorname{Hom}(V,V^*)## or ##operatorname{Hom}(V^*,V)##. But if you know a good answer, I really like to hear it.
This must mean I am B-level. :oops::eek::frown:Well, your motivation can't have been to learn what a tensor is. That's for sure. :cool: Maybe you have been curious about another point of view. As I started, I found there are so many of them, that it would be carrying me away more and more (and thus couldn't be used as a short answer anymore). It is as if you start an article "What is a matrix?" by the sentence: "The Killing form is used to classify all simple Lie Groups, which are classical matrix groups. There is nothing special about it, all we need is the natural representation and traces … etc." Could be done this way, why not.

This is the skeleton I originally planned:

subsection*{Covariance and Contravariance}
subsection*{To Rise and to Lower Indices}
subsection*{Natural Isomorphisms and Representations}
subsection*{Tensor Algebra}
section*{Stress Energy Tensor}
section*{Cauchy Stress Tensor}
section*{Metric Tensor}
section*{Curvature Tensor}
section*{The Co-Universal Property}
subsection*{Graßmann Algebras}
subsection*{Clifford Algebras}
subsection*{Lie Algebras}
section*{Tensor Fields}

• WWGD says:

I think describing ##c(a \otimes b)## from the perspective of maps as the equivalence class of bilinear maps that take the pair (a,b) to c may help understandability for some people.

40. Orodruin says:

Perhaps I was mislead regarding the intended audience from the beginning. I am pretty sure most engineering students will not remember what a homomorphism is without looking it up. Certainly a person at B-level cannot be expected to know this?

In the end, I suspect we would give different answers to the question in the title based on our backgrounds and the expected audience. My students would (generally) not prefer me to give them the mathematical explanation, but instead the physical application and interpretation, more to the effect of how I think you would interpret "how can you use tensors in physics?" or "how do I interpret the meaning of a tensor?"

fresh_42

Nobody on an "A" and probably as well on an "I" level reads a text about what a tensor is.This must mean I am B-level. :oops::eek::frown:

41. fresh_42 says:
Orodruin

42. Orodruin says:

Let me first say that I think that the Insight is well written in general. However, I must say that I have had a lot of experience with students not grasping what tensors are based on them being introduced as multidimensional arrays. Sure, you can represent a tensor by a multidimensional array, but this does not mean that a tensor is a multidimensional array or that a multidimensional array is a tensor. Let us take the case of tensors in ##Votimes V## for definiteness. A basis change in ##V## can be described by a matrix that will tell you how the tensor components transform, but in itself this matrix is not a tensor.

Furthermore, you can represent a tensor of any rank with a row or column vector – or (in the case of rank > 1) a matrix for that matter (just choose suitable bases). This may even be more natural if you consider tensors as multilinear maps. An example of a rank 4 tensor being used in solid mechanics is the compliance/stiffness tensors that give a linear relation between the stress tensor and the strain tensor (both symmetric rank 2 tensors). This is often represented as a 6×6 matrix using the basis ##vec e_1 otimes vec e_1##, ##vec e_2 otimes vec e_2##, ##vec e_3 otimes vec e_3##, ##vec e_{{1} otimes vec e_{2}}##, ##vec e_{{1} otimes vec e_{3}}##, ##vec e_{{2} otimes vec e_{3}}## for the symmetric rank 2 tensors. In the same language, the stress and strain tensors are described as column matrices with 6 elements.

43. fresh_42 says:
lavinia

– Students of General Relativity learn about tensors …

– Students of Quantum Mechanics learn about tensors …

– If one wants to discuss tensor products purely mathematically …I know, or at least assumed all this. And I was tempted to explain a lot of these aspects. However, as I recognized that this would lead to at least three or four parts, I concentrated on my initial purpose again, which was to explain what kind of object tensors are, rather than to cover all aspects of their applications. It was meant to answer this basic question which occasionally comes up on PF and I got bored retyping the same stuff over and over again. That's why I've chosen Strassen's algorithm as an example, because it uses linear functionals as well as vectors to form a tensor product on a very basic level, which could easily be followed.

44. burakumin says:
fresh_42

No, this interpretation was of course not intended, rather a quotient of the free linear span of the set ##U times V##.
I added an explanation to close this trapdoor. Thank you.Thank you

45. fresh_42 says:
burakumin

If I interpret correctly this sentence says the underlying set of U⊗V is U×V. This is not correct. This works for the direct sum U⊕V but the tensor product is a "bigger" set than U×V. One usual way to encode it is to quotient ##mathbb{R}^{(U times V)}## (the set of finitely-supported functions from U×V to ##mathbb{R}##) by the appropriate equivalence relation.No, this interpretation was of course not intended, rather a quotient of the free linear span of the set ##U times V##.
I added an explanation to close this trapdoor. Thank you.

46. burakumin says:
lavinia

The tensor product of two 1 dimensional vector spaces is 1 dimensional so it is smaller not bigger than the direct sum. The tensor product tof two 2 dimensional vector spaces is 4 dimensional so this is the the same size as the direct sum not bigger.This is correct but missing the relevant point: that the presentation contains a false statement. The fact that you can indeed find counter examples where the direct sum is bigger than the tensor product does not makes the insight presentation any more correct.

47. lavinia says:
burakumin

If I interpret correctly this sentence says the underlying set of U⊗V is U×V. This is not correct. This works for the direct sum U⊕V but the tensor product is a "bigger" set than U×V. One usual way to encode it is to quotient ##mathbb{R}^{(U times V)}## (the set of finitely-supported functions from U×V to ##mathbb{R}##) by the appropriate equivalence relation.The tensor product of two 1 dimensional vector spaces is 1 dimensional so it is smaller not bigger than the direct sum. The tensor product tof two 2 dimensional vector spaces is 4 dimensional so this is the the same size as the direct sum not bigger.

48. lavinia says:

– Students of General Relativity learn about tensors from their transformation properties. Tensors are arrays of number assigned to each coordinate system that transform according to certain rules. Arrays that do not transform according to these rules are not tensors. I think that it would be helpful to connect this General Relativity approach to the mathematical approach that you have explained in this Insight.

Also these students need to understand how a metric allows one to pass back and forth between covariant and contra-variant tensors. One might show how this is the same as passing between a vector space and its dual.

– Students of Quantum Mechanics learn about tensors to describe the states of several particles e.g. two entangled electrons. In this case, the mathematical definition is more like the Quantum Mechanics definition but for the Quantum Mechanics student it is also important to understand how linear operators act on tensor products of vector spaces.

– If one wants to discuss tensor products purely mathematically, then one might show how they are defined when the scalars are not in a field but in a commutative ring – or even a non-commutative ring. It is potentially misleading to says that mathematical tensors require a field.

BTW: The tensor product of two three dimensional vector spaces is nine dimensional. The tensor product to two 1 dimensional vector spaces is 1 dimensional.

49. burakumin says:
fresh_42

Definition: A tensor product of vector spaces U⊗V is a vector space structure on the Cartesian product U×V that satisfies …If I interpret correctly this sentence says the underlying set of U⊗V is U×V. This is not correct. This works for the direct sum U⊕V but the tensor product is a "bigger" set than U×V. One usual way to encode it is to quotient ##mathbb{R}^{(U times V)}## (the set of finitely-supported functions from U×V to ##mathbb{R}##) by the appropriate equivalence relation.


text:
# Was Kepler aware of the following golden relationship between the planets?

Was Kepler aware that Venus and Mars have a golden section relationship other than that he attributed to them in his 5 perfect solids model of the Solar System? The dodecahedron and the icosahedron, which Kepler placed between the Earth and Mars and Venus, both have the golden section in their structure.

The value for Venus's semi-major axis (in AU) to the power of 21 multiplied by that of Mars to the power of 55 equals $\varphi$ (the golden section) to the power of 34! These are Fibonacci numbers and any such sequence means that using powers above or below in the Fibonacci sequence (or the Lucas sequence) will give an approximate same answer.

From NASA: Venus's semi-major axis (0.72332102 AU) to the power of 21 times Mars's semi-major axis (1.52371243 AU) to the power of 55 equals $\varphi$ to the power of 34. The discrepency is 1.000088909, but it would be the 76th root of this, 1.00000117, to correct the equation. Venus's semi-major axis to the power of 13 times Mars's semi-major axis to the power of 34 equals $\varphi$ to the power of 21, which is is 1.002919389. The 47th root is 1.000062026. Venus's semi-major axis to the power of 18 times Mars's semi-major axis to the power of 47 is $\varphi$ to the power of 29, which is 1.008694078. The 65th root is 1.000133186.

What understanding of these relationships and calculations did Kepler demonstrate in his published works?

• There are currently 2 close votes as "off-topic" on this question. I don't know if this question is off-topic, but that's primarily because I don't understand what is being asked. This question would be much easier to understand if you use MathJax to format your post (see e.g. math.stackexchange.com/help/notation) and explain what the numbers are that you're using. Jan 28 '15 at 19:32
• Along with what Logan said: The fact that this is just one big block of text doesn't help. Links would also be nice, as would complete sentences and perhaps a better list for the numbers at the end. Jan 28 '15 at 21:41
• Seems ok now. Kepler couldn't use NASA data of course, but he must have had some estimates for semi-axes of his ellipses. One problem seems to be that he'd have had to relate them to the Earth-Sun distance to see numerical coincidences in AU. Jan 29 '15 at 0:18
• Why in the world would raising such numbers to those powers have any real meaning? You consider these numbers up to 8 digits after the decimal and then declare high powers of them are "equal" when they are off by a factor that is not really 1 to such accuracy.
– KCd
Jan 29 '15 at 8:06
• In his book Harmonies of the World the only A.U. values I could find were .721 for venus and 1.523 for mars venus power 2 times mars power 5 =Phi power 3 1.0055 What I am asking is has anyone come across this idea before me? Jan 30 '15 at 3:23


text:
2021-12-07

translated by 谷歌翻译

2021-02-16

translated by 谷歌翻译

2021-11-07

translated by 谷歌翻译

2020-08-20
LIDAR数据的实时语义分割对于自动驾驶车辆至关重要，这通常配备有嵌入式平台并具有有限的计算资源。直接在点云上运行的方法使用复杂的空间聚合操作，这非常昂贵，难以优化嵌入式平台。因此，它们不适用于嵌入式系统的实时应用。作为替代方案，基于投影的方法更有效并且可以在嵌入式平台上运行。然而，目前基于最先进的投影的方法不会达到与基于点的方法相同的准确性并使用数百万个参数。因此，我们提出了一种基于投影的方法，称为多尺度交互网络（Minet），这是非常有效和准确的。该网络使用具有不同尺度的多个路径并余额尺度之间的计算资源。尺度之间的额外密集相互作用避免了冗余计算并使网络高效。在准确度，参数数量和运行时，所提出的网络以基于点为基础的基于图像和基于投影的方法。此外，网络处理在嵌入式平台上每秒超过24个扫描，该嵌入式平台高于激光雷达传感器的帧。因此，网络适用于自动车辆。
translated by 谷歌翻译

2021-08-06

translated by 谷歌翻译

2021-12-02

translated by 谷歌翻译

2020-08-10

translated by 谷歌翻译

2021-11-18

translated by 谷歌翻译

2020-09-17

translated by 谷歌翻译

2021-12-06

translated by 谷歌翻译

2021-11-26

translated by 谷歌翻译

2021-08-05

translated by 谷歌翻译

2021-04-10

translated by 谷歌翻译

2022-01-10

translated by 谷歌翻译
Convolutional networks are powerful visual models that yield hierarchies of features. We show that convolutional networks by themselves, trained end-to-end, pixelsto-pixels, exceed the state-of-the-art in semantic segmentation. Our key insight is to build "fully convolutional" networks that take input of arbitrary size and produce correspondingly-sized output with efficient inference and learning. We define and detail the space of fully convolutional networks, explain their application to spatially dense prediction tasks, and draw connections to prior models. We adapt contemporary classification networks (AlexNet [20], the VGG net [31], and GoogLeNet [32]) into fully convolutional networks and transfer their learned representations by fine-tuning [3] to the segmentation task. We then define a skip architecture that combines semantic information from a deep, coarse layer with appearance information from a shallow, fine layer to produce accurate and detailed segmentations. Our fully convolutional network achieves stateof-the-art segmentation of PASCAL VOC (20% relative improvement to 62.2% mean IU on 2012), NYUDv2, and SIFT Flow, while inference takes less than one fifth of a second for a typical image.
translated by 谷歌翻译

2021-11-25

translated by 谷歌翻译

2021-12-07

translated by 谷歌翻译

2021-11-24

translated by 谷歌翻译

2021-07-07

translated by 谷歌翻译

2022-01-03

translated by 谷歌翻译
\${authors}

\${pubdate}
\${abstract_cn}
translated by 谷歌翻译


text:
The First and Basic Function of Management - Organisation of Commerce and Management

The first and basic function of management

Solution

Planning is the first and the basic function of management.
Planning can be defined as a process of setting goals and objectives for a given period of time, evaluating alternatives for the course of action and deciding an appropriate action from various alternatives. It is the first function of management.

Is there an error in this question or solution?


text:
# Physical simulation- how to create anti-gravity in objects like hot-air balloons

How do you create objects that "defy" gravity like an hot-air balloon?

Then halfway into animation, how do you make the hot-air balloon drop anti-gravity, as it loses heat?

What kind of object?

### Rigid body

An individual rigid body cannot be made anti-gravity, however you can make the entire scene gravity point upwards by changing Z=-9.8 to a positive number in the Scene Gravity settings:

"Gravity" is a property that can be keyframed, i.e. you can make it change at a given frame.

### Cloth or soft body

For cloths and soft bodies you can choose what Gravity each object is feeling. There is a "Field Weight" panel in the Physics settings. There you can change Gravity to a negative number (assuming that you don't change the Gravity scene settings!). The slider won't allow you to do that, but you can just type something like -0.5.

Again, this can be keyframed.

Here is a scene with a Soft Body hot air balloon, with its Gravity Field Weight set to -0.3 (Scene Gravity is untouched), and with a Wind Force Field at a given altitude (also a Turbolence Force Field for more wiggling):