why is sphere surface 4pi R^2

Imagine a giant hoop passing through south and north poles. If I build a railroad along the equator and pull the hoop one complete

round, the hoop would have swept the entire surface exactly twice. The hoop perimeter is 2?R or 2? assuming R=1.

Imagine yourself holding one point of the hoop during the sweep. You can further imagine all the people (about 7,000,000,000)

holding on the hoop shoulder to shoulder from North pole to the equator. We would cover a quarter hoop. In one round we would sweep

half the sphere area. Each person's travel path distance will be different. The longest path is the equator — 2?R. At the pole the

sweep path is 0.

Q: what's the average travel among all those people? I think answer turns out to be 4R, which is slightly short of 66.666% of the

equator length.

Q: (To keep this question simpler, we can keep the hoop still.) What's the average distance from the axis? I think it's 2R/?

matrix multiplying – simple, memorable rules

Admittedly, Matrix multiplication is a cleanly defined concept. However, it’s rather non-intuitive and non-visual to many people. There are quite a few “rules of thumb” about it, but many of them are hard to internalize due to the abstract nature. They are not intuitive enough to “take root” in our mind.

I find it effective to focus on a few simple, intuitive rules and try to internalize just 1 at a time.

Rule — a 2×9 * 9×1 is possible because the two “inside dimensions” match (out of the 4 numbers).

Rule — in many multiplication scenarios, you can divide-and-conquer the computation process BY-COLUMN — A vague slogan to some students. It means “work out the output matrix column by column”. It turns out that you can simply split a 5-column RHS matrix into exactly 5 columnar matrices. Columnar 2 (in the RHS matrix) is solely responsible for Column 2 in the output matrix. All other RHS columns don’t matter. Also RHS Column 2 doesn’t affect any other output columns.

You may be tempted to try “by-row”. I don’t know if it is valid, but it’s not widely used.

By-column is useful when you represent 5 linear equations of 5 unknowns. In this case, the RHS matrix comprises just one column.

Rule — Using Dimension 3 as an example,

(3×3 square matrix) * (one-column matrix)  = (another one-column matrix). Very common pattern.

yield-/smile-curves are not directly related to greeks

The yield curve and smile curve (or surface) are the output of curve fitting engines, calibrated using a lot of commercial market data, discarding outliers. These are the most valuable soft market data objects. Directly used by decision makers, including trade pricing. Each trading desk guards these curves as highly proprietary trading secrets.

However, these curves are imprecise. You shouldn’t compute the gradient at each point on these curves. The most you do with such gradient is computing the gradient at the anchor vol point, which gives you the skew of the entire curve.

In contrast, the price-vs-impliedYield curve and the valuation-vs-spot curve are a different class of curves. (The valuation-vs-impliedVol curve is another example.) I call these “range of possibilities” curves. They are mathematically precise enough to let us compute gradient at every point. You get duration and delta. These are known as sensitivities, essential soft market data for risk management.

linear independence ^ basis

Let’s use dimension of 3 as a simple example. A 3-dimension space consists of all points in a 3-D coordinate system (real-valued). An address (or point) in this space always has 3 real-valued coordinates – x, y and z. Linear Algebra represents such an address using a column vector
Now, a family of two, there or more vectors can be either linearly independent, or form a basis of this 3-D space, or both (or neither).
LI can be defined this way – using vector linear operations (i.e. addition/scaling) within the family, we can’t express any vector using the sisters. If we can, then one of the vectors can be linearly constructed with the other vectors. In such a case, another family member can also be linearly constructed. There’s plenty of redundancy in the family.
Now Basis (not a definition) – using vector linear operations (i.e. addition/scaling) within the family, we can express _any_ vector in the entire space. In we can, then the family qualifies as a basis of the space, but no redundancy please.
Note, since a basis is a Minimal family, a basis family must be LI. The converse doesn’t hold — A LI family may not form a basis.

event/method pairs in WPF

In learning WPF/Silverlight, I had a few confusions that are similar. These confusions probably fall into the same category. In all cases, one class has both an Event and a Method of a similar name. Here are some cases in point.

Tip: On*** is usually a method

1) Method OnPropertyChanged() vs PropertyChanged event
PC is more fundamental than OPC. PC is heart of the familiar INotifyPropertyChanged interface. As a result, wpf developers (like us) are frequently required to raise PC events explicitly. How do we raise? Often in a non-static OnPropertyChanged() method. So /there you are/, the link between PC and OPC.

http://msdn.microsoft.com/en-us/library/ms743695.aspx is an MSDN tutorial showing exactly this OPC/PC pattern.

The authoritative MSDN documentation http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx shows the same pattern except the OPC method is actually named NotifyPropertyChanged.

OPC is not a standard method name dictated by the framework. It’s more of a method naming convention.

2) This case is found in the commanding infrastructure of WPF. Method CanExecute() vs CanExecuteChanged event. Once the event fires[2] and a command source object [3] gets its callback method invoked[1], that callback method internally calls CanExecute() to check if it should paint itself dimmed.

[1] often on the GUI thread.
[2] (by invoking each callback on the inv list),
[3] (eg button)