Meaning of | In Mathematical Equation

What does the | in a mathematical equation mean? For example, in this equation:
f(theta|u) <is proportional to> f(u|theta)f(theta)
what do the |'s mean?

I believe it’s something from linear algebra and/or statistics, but it isn’t ringing a bell from either. Granted, I took those classes about 10 years ago…

Thats Conditional probability.

It means the probability of theta given u is the prob of u given theta times prob of theta

Hmm. Ok. MAYBE I can make sense of these equations (or, well, proportions) now, then. Thanks :slight_smile:

Another vote for conditional probability. You might also see | used as a NAND or a bitwise-or operator, but those are a little less common.

And if there’s 2 |'s with some stuff in between, it means ‘absolute value’ of the stuff. |2-5| = |-3| = 3.

But that’s probably way too basic.

In most forms of C-based programming languages (C, C++, C#, PHP, JavaScript, Perl) the “|” pipe character is used to dentote OR in an if() statement.


if ( (I am cool) && (I am sweet) ) // AND
{
     I'm probably ice cream.
}

if ( (I am big) || (I am sweaty) ) // OR
{
     I'm probably a football player.
}


In general, |A| is used to denote the “size” of the object A, in whatever sense is appropriate.

For a set A, |A| is the number of elements. For a sequence of characters A, |A| is the length.

I’ll add that when | is used in this way, one could read your equation as:

“f of theta given u is proportional to f of u given theta times f of theta.”

IIRC, | can also mean “such that.” For example, it might be an arguement in a function, “f of x, such that x is greater than seven” would be f(x|x>7), or defining a thingie as in “B is defined to be the set of objects K, such that K is an even number” would be B:={K|K=2x} where x is a real number.

I think. IIRC, that is. Here is Mathworld’s result for the words “such that”:

http://mathworld.wolfram.com/SuchThat.html

Also:

I’ve never seen this notation, and I’m not really sure exactly what it’s supposed to mean. Does it restrict x to be greater than 7?

I don’t remember all of this stuff, but I think notation like this is used to describe a function whose behavior is different in different cases. For example:

f(x|x>3) = 3x
f(x|0 < x <= 3) = x^2 (that’s x raised to the power of two.)
f(x| x <= 0) = x

These three lines together describe a continuous function on the full range of integers that behaves differently in three different sections, and can most easily be described with three seperate functions. The slope of the function is a good way of demonstrating how it behaves differently. (Below zero, the slope is 1, above 3, the slope is 3. Between zero and three, the slope is variable as the graph of the function describes part of a parabola.)

I hope this helps, and that I’m not wrong LOL.

Jon the Geek, can you provide more context for the expression you’re asking about?

You mention that it might have something to do with linear algebra. Some people use the | to denote the inner product of two vectors. More precisely, physicists sometimes write the inner product of two vectors x and y as (x | y) (but more commonly as <x | y> . That’s probably not what’s happening in your case though, because the inner product of two vectors is a scalar, so you would have f being a function of both vectors and scalars.

FTR: | is also used to mean ‘divides’ as in 2|6 means six is even. Though not in this case.

In Electromagnetics, we use it in Green’s functions, for example:

G(x,y,z | x’,y’,z’)

where G gives the field strength at x,y,z due to a point excitation at x’,y’,z’. It doesn’t really mean anything more than a comma, but makes reading it easier.

The proper name for this type of notation is “set builder notation”.

Oh, and another FTR. If f:C->C (f is a function taking a complex no. to a complex no.) then f|[sub]R[/sub] is the function on real numbers that’s the same as f on R.

Boy, the poor | symbol is almost as overworked as the parantheses.

Another use that I can think of (and clearly not what Jon the Geek is looking for) is for evaluating an antiderivative at the bounds of integration:

Integral[sub]a[/sub][sup]b[/sup] f(x) dx = F(x) | [sub]a[/sub][sup]b[/sup].

Looks like Bayes’ Rule to me. Those that have said “conditional probability” and “theta given u” are correct.

f(theta | u) is defined as f(theta, u) / f(u) i.e. the number of times theta and u occur together divided by the total number of times u occurs. Bayes says f(theta | u) is equal to f(u | theta)f(theta) / f(u) and thus proportional to f(u | theta)f(theta) when comparing over a single u.

Some more info:
http://www.ai.mit.edu/~murphyk/Bayes/bayesrule.html

Also not what you’re looking for but, if you take a matrix, which is usually surrounded by [square brackets], and instead surround it with |pipes|, it means the determinant of the matrix.

Actually, this is an adaptation of the more general “restricted to” notation. Given a presheaf on a directed system, an object “at” one site “restricts to” any “lower” site. Often the system is that of measurable subsets of some topological space and the objects are functions. If U is a subset of V and f is a function on V, then f|[sub]U[/sub] is the restriction of the function to U. Now if the subset in question is a singleton {a}, then this is usually cut to f|[sub]a[/sub] rather than f|[sub]{a}[/sub]. adding more scripts extends to the notion of restriction to chains, and superscripts are taken with the opposite orientation. Thus f|[sub]a[/sub][sup]b[/sup] = f(b)-f(a).

As a side note, the bar is not usually used inside the argument to a function in the sense of “such that”, but rather in a propositional calculus of some sort. {x in R | x[sup]2[/sup] in Z} to denote the set of real numbers x such that x is a square root of an integer, for instance.