Saturday, September 28, 2013

Apple's New iOS and User Interface Design Principles

I was thinking about the new iOS "flat look" and about product branding. That's really the point. Oh, there might be a small amount of usability or evolution of the computer suaveness of iOS users in the transition from a skeuomorphic design. Skeuomorph are objects that retain ornamental design cues to structures that were necessary in the original. For example, making an address book look like a book or a calendar icon look like a desk calendar.

In the early days of GUI design, skeuomorphic design was considered a good visual clue for novice users and often involved a "3D" look. Now Apple has gone to a "flat look" that some find more modern and pleasing to the eye, although many have complained that the new iPhone and iPad look with thinner fonts and other changes is harder to see and use. Of course, any change to a familiar item will raise doubts and concerns in users used to the old way. That’s human nature.

You know, some design changes are like the width of ties. They just change it to force you to buy new ones. I'm not sure what I think about the new look. It is cleaner and even more modern looking, but I didn't mind the old look. Appearance of a device is an important part of the overall user experience, and I like products designed by designers rather than just engineers — something Apple was very successful with in the past. So are these changes just changes for changes sake, or are they really useful evolution of an interface used by everyone from quantum physicists to my great aunt (93 years old)? Now that is the question.

Let me change the subject slightly and speak of branding. After all, the appearance of the user interface on a product that consists primarily of just a screen … be it a smart phone or tablet … is more than just a vehicle for data entry and output, but really the look and feel is part of the branding.

Years ago, when I worked for IBM Printing Systems Division, we had a brand for our printers: “InfoPrint.” That’s a neat name. After all, IBM was in the information business, where “information” was the new buzz word replacing “data” in the marketing consciousness. (There is a difference between “information” and “data,” with the former considered higher on the intellectual scale and therefore more useful to business customers.) Over the years computers had evolved from simple data processors to “information appliances.” Anyway, InfoPrint was a pretty good name for our printers which could print text and graphics and color and barcodes and all kinds of marks on paper. Actually, we did a lot more than marks on paper. Our systems could also fax and email and even push data to web sites. Our printers could even write to RFID tags. A lot more than the conventional understanding of the word "print."

So, at one point, our gallant leaders decided we would change the “P” in InfoPrint to a lower case letter to de-emphasize printing as we did a lot more with “Info.” So it was decreed in the PSD land that the “P” would become “p.” That involved several million lines of code that had to be scanned and have the term changed on everything from computer screen output to print output to even comments and statements in the code.

Let me explain briefly how computer programs work with words or text. It is usually called “strings.” That is, strings of letters like pearls on a necklace. The common computer data structure used is an array. Now for you non programmers, a computer “array” is like a mathematical “matrix.” And for you non-mathematicians, it is sort of like a crossword puzzle. At least a two-dimensional array or matrix is like a crossword puzzle. There are rows and columns and little squares each of which fits one letter or character.

These little squares are called “cells” and you can often identify them by a number. The first cell in the row might be called C1 and the second cell C2 and the twelfth C12. A string is usually a one dimensional array like one row in a crossword puzzle.

Now there are variable strings that store data that changes. For example, when you enter a userid or a password on a computer screen, what you type may be stored in a variable string. There are also “literal strings,” which are strings that don’t change. The programmer gives them a value and that is kept throughout the program. The literal string may have a title or name or identifier.

So our software was full of something like this: name = “InfoPrint”

Now it doesn’t seem hard to use a search and replace function to change all “InfoPrint” to “Infoprint,” but it was a bit more complicated. You see, any change to a computer program, especially a large program with over one million lines of code, which is what we had a bunch of, is dangerous. Even though this is about the smallest change you can imagine, the string length didn’t change, and it is just a literal string, so it should not have any dire consequences, but programs are very brittle and the smallest change can break something.

So even this little change required hundreds of hours of programmer time to make the changes, test the changes, verify the changes, and even fix a few things broken by the change. For example, the small “p” is narrower than the large “P,” so it can change alignment and line breaks.

So, we made the change as directed by the executives and, a few years later, all our software said “Infoprint.”

Then we were sold to Ricoh. IBM sold the Printing Systems Division, its 3,000 employees, all its patents and products, to a Japanese printer company called “Ricoh.” We needed a new name and brand since we could no longer be “IBM.” IBM would not sell the right to use that name. So, our new President (who used to be our division “General Manager” — his title was changed too) announced we would be “InfoPrint.” That’s right … the big “P” was back.

He said he had seen an old poster and knew that used to be our brand. Some snickered and asked him why. He said, “ ‘Infoprint’ is a word, ‘InfoPrint’ is a brand.” Oh. Alright everybody, back to your terminals. We’ve got some code to change.

So I am sensitive to branding and user interface changes and I’m also appreciative of design, especially user interface design … the “look and feel.” Is the new flat look more modern? Or is it just copying Microsoft’s new look and feel?

One issue with an interface is consistency. If the look is to be “flat,” then the entire look should be flat. Get rid of a “Notes” app that looks like yellow lined paper. Make the calculator look less like a business machine. Make the calendar look less like a paper calendar. Make an address book look … you get the idea. Consistency.

That means that, not only does Apple have to change the look of its OS, but also the look of all the apps. And most of the apps are not written by Apple. The change is under way. That’s one reason you see so many app updates.

A lot of work went into making the transition by both Apple and now by the creators of the popular apps on iOS. Would all that effort have been better spent on things like improving security or communications rather than simple look and feel items? That’s the question too.

I’ll conclude with a description of one of the nicest user interfaces I encountered in my early years of programming. It was a program from Lotus before IBM bought Lotus. It was called the “Organizer” and was a complete address book, calendar, to-do, etc. It was modeled almost perfectly after a typical portfolio or address book such as the Day-Timer or Franklin Planner. It looked like a book and the pages turned like a book, reminiscent of what Apple would do later. It had tabs like a book and even a cover.

Organizer also had a page for just “notes,” similar to the function of the Evernote app on a Mac. It also had a section of anniversaries that you could record birthdays and wedding anniversaries and it would pop them onto the calendar every year so you would never miss a celebration. I added the year to the anniversaries to keep track of the age of nieces, nephews, and parents. A very useful addition to any calendar. I don’t know if either Microsoft Outlook or Apple apps support that feature. I’ve never found it.

One interesting visual feature of Organizer was when you drug something to the trash bin, it would explode in fire and be incinerated. From a user interface design, although that was quire interesting visually and even had a “burning sound,” in fact the deleted item was not destroyed. You could restore deleted items if you wished. That's a misuse of a visual clue. Although it was pretty to see the wastebasket contents burned up, it implies that they are gone. Notice that both Apple and Microsoft's wastebaskets show the contents until you "empty" the basket and permanently delete the data. That is matching the interface action to the true program function. Pretty is nice, but accurate representations is best.

It was pretty and interesting and fun to use and — most important — it worked well and was easy to use. I used it during my entire time when Windows was my primary personal operating system. When I converted to Mac for personal computers in 2010, I switched to the MacOS apps of address book and calendar. Besides there being less visually exciting or downright “pretty,” they lacked important function. For example, in Lotus Organizer, I could link items together like related address book entries or calendar reminders with other data including a simple notebook page. This multiple linking was a superior function to anything else out there from Microsoft Outlook to anything on the Mac. I was even able to sync Organizer to my Palm Pilots and Palm smartphone. But, when I went to Apple for phone and computer, I was forced to change programs.

Fortunately it was easy to migrate the data, but now I’m using Address Book, Calendar, and even Evernote, where I used to just use Organizer … and they are not as pretty or “skeuomorphic.”

After reading the complaints from people about the new Apple flat look where people are finding the new font harder to read or my confusion with the “shift” key … understanding if it was pressed or not from the icon change … I’m not sure I agree with the new look.

Should Apple have invested more programmer time in new function, such as multiple links between items in various apps instead of keeping programmers up late at night changing the style of icons and screen? Well, that’s for the customers to decide … the way customers always decide … with their dollars.

Is Apple just being trendy or are they still leading the design wave? Did Apple substitute narrower ties for real functional updates? What do you think?

I think the answer will lie in what happens over the next year or two. Apple has always bragged that it doesn’t listen to customers but “leads” them. Are they leading them down a path that customers will ultimately embrace? Or is it a dead end that will boost the credibility of the competition? Time will tell?

Thursday, September 5, 2013

Mathematics -- Part Four: Geometry

Geometry, literally “Earth-measurement,” is a branch of mathematics concerned with questions of shape, size, relative position of figures, and the properties of space. I’ve mentioned many times in my writing that virtually all of modern mathematics traces its roots back to ancient Greece. Geometry is the branch of math that is the deepest root. Although the Greeks did work with numbers and some other branches, it was their work with Geometry that set the pattern for an axiomatic, proof based structure.

An axiom is a statement or proposition that is regarded as being established, accepted, or self-evidently true. The Greeks thought they were the latter … “self-evidently true.” A more modern understanding is that these foundation principles are established and accepted and they are a minimum set of accepted beliefs. All else is derived from these fundamental axioms and logical techniques using “proof techniques.”

I think that all readers know that Geometry is concerned with shapes such as points, lines, circles, triangles, rectangles, etc. In addition, the Greeks had a very simple limit to the tools that were to be used to develop the discipline using so-called “constructions.” All the proofs are based on constructions that can be performed with only two tools: a compass and a straight edge. A compass can be used to draw circles and arcs and also to make certain measurements. The straight edge is like a ruler, only there are no markings. It is only used to draw straight lines and connect points. The compass is the only allowed measuring tool.

The fundamental axioms that the Greeks brought to refinement are collected in a text book called The Elements. Euclid's Elements is a mathematical and geometric treatise consisting of 13 books written by the ancient Greek mathematician Euclid in Alexandria ca. 300 BC. It is a collection of definitions, postulates or axioms, propositions (theorems and constructions), and mathematical proofs of the propositions. The thirteen books cover Euclidean Geometry and the ancient Greek version of elementary number theory. Most scholars believe that the book is a collection of proofs and work developed by several predecessors, but also contains original work by Euclid. It is thought that he sometimes replaced earlier fallacious proofs with more precise and correct versions he developed.

Everything is based on the definitions and axioms. Book 1 contains Euclid's famous 10 axioms. He called the first five “postulates” and the remaining five “common notions.” One reason he divided the list is that some pertained only to Geometry and the last five were common to numbers and figures. Most controversial among the list is the fifth postulate called the "parallel postulate." Although the fifth axiom speaks about non-parallel lines intersecting, you can derive the proof of parallel lines not meeting from it. The rest of the book are the basic propositions of Geometry: the Pythagorean theorem (Proposition 47), equality of angles and areas, parallelism, the sum of the angles in a triangle, and the three cases in which triangles are "equal" or congruent (have the same area).

The Elements was the most widely used textbook of all time, has appeared in more than 1,000 editions since printing was invented, was still found in classrooms until the twentieth century, and is thought to have sold more copies than any book other than the Bible.

This collection was so influential to mathematics for the last two centuries that new translations were being published regularly and as recently as 1939 and there are mathematicians alive today who originally learned Geometry and other math directly from this ancient book.

The Elements also contained 23 definitions for such objects as a point, a line, a straight line, a surface, an angle, a square, a circle, even the concept of the center of a circle.

Let’s examine the ten axioms that Euclid used to base his entire mathematical system upon.

  1. Any two points can be joined by a straight line.

  2. Any straight line segment can be extended indefinitely in a straight line.

  3. Given any straight line segment, a circle can be drawn having the segment as radius and one endpoint as center.

  4. All right angles are congruent.

    (Two objects are congruent if they have the same dimensions and shape. Very loosely, you can think of it as meaning “equal,” but it has a very precise meaning, especially for complex shapes.)

  5. Parallel postulate: If two lines intersect a third in such a way that the sum of the inner angles on one side is less than two right angles, then the two lines inevitably must intersect each other on that side if extended far enough.

  6. Things that equal the same thing also equal one another.

  7. If equals are added to equals, then the wholes are equal.

  8. If equals are subtracted from equals, then the remainders are equal.

  9. Things that coincide with one another equal one another.

  10. The whole is greater than the part.

Axioms 1 and 3 justify the two basic tools of Geometry. The second postulate gives an expression to a commonly held belief that straight lines may not terminate and that the space is unbounded. By Definition 10, an angle is right if it equals its adjacent angle. Thus the fourth postulate asserts homogeneity of the plane: in whatever directions and through whatever point two perpendicular lines are drawn, the angle they form is one and the same and is called right. We may think of the fourth postulate as having been justified by the everyday experience acquired by man in the finite, inhabited portion of the universe which is our world and extrapolated (much as the Postulate 2) to that part of the world whose existence (and infinite expense) we sense and believe in.

If this was a math class we could get into categories such as plane Geometry (figures on a flat surface) and solid Geometry. We could talk about Euclidean Geometry and non-Euclidean — systems where postulate five is changed.

Certainly some, if not all, of these items seem quite basic and self evident. The Parallel postulate may be considered an exception to this and it was a problem for Euclid and many mathematicians that followed. However, as I’ve stated, these are accepted as true without proof. Everything else in Geometry, and all of mathematics for that matter, is based on these basic ideas. They are derived using a formal process called a “proof.” We now understand that all axiomatic systems must start with a few accepted facts that can’t be proven, but must be “accepted.” All else is constructed systematically from these basic beliefs. That is what an axiomatic system is. The constructions must be consistent and follow clear rules of logic. The axioms act as the foundation or basis for it all.

It is absolutely amazing what Euclid was able to do with his basic axioms and the two tools of Geometry. Not only did he derive geometric results, but he explained how to use the tools to produce certain numeric results, such as the square root of two. His collection included books on plane geometry, ratios and proportions, and spatial or solid geometry. Recall that ratios were essential to Greek number theory and the basis of the Rational numbers. Euclid also dealt with Irrational numbers in the construction of roots and even analysis of pi.

One unsolved problem for Euclid was the “squaring of the circle.” That problem is to construct a square with the same area as a given circle using only the two tools of compass and straight edge. We now know that that problem can’t be solved since pi is a transcendental number. Besides being Irrational, it can’t be produced by a finite number of additions, subtractions, multiplications, divisions, powers and roots. That means you can’t solve the problem of the area of a circle with only a compass and straight edge.

As an educator I was always interested in student’s reactions to mathematics. Many would struggle with more advanced arithmetic and algebra, and yet they would come alive and gobble up Geometry lessons like you would not believe. I think the ability to sort of "start fresh" when they first experienced Geometry was part of the effect. After all, High School Algebra is based on Junior High logarithms and Elementary School fractions. Once a student got behind in traditional math, they had trouble catching up because it all builds on previous learning.

Geometry sort of started all over fresh, and allowed those with weak backgrounds in math to begin from the beging. In addition, many students would respond better to the visual representations of Geometry and that helped them understand better than math based on numbers or letters. The focus in Geometry seems different too. Instead of solutions to equations, the problems were often to define proofs, which seem more like legal arguments than mathematics. In any case, people often report that they enjoyed Geometry more than any other math.

As an aside, the ability to do proofs is not good in modern college students. Many universities will teach a refresher course on mathematical proofs for students who pursue advanced math. I believe that, decades ago, students understood proofs better due to more study of Geometry in High School than is done today.

However, while the visual nature of Geometry makes it initially more accessible than other parts of mathematics, such as algebra or number theory, geometric language is also used in contexts far removed from its traditional. Sadly, as I stated, I think modern K-12 school curriculum have reduced the amount of time spent on Geometry in favor of arithmetic and algebraic topics. In my day I studied Geometry for a year and one-half in High School, plus half a year of Trigonometry and two years of Algebra. Now we often teach an introduction to Calculus in High School, but replace Geometry with this advanced form of Algebra.

As I mentioned above, Euclid had concerns about the fifth or “Parallel Postulate.” He didn’t use it in a proof until proposition 29, proving the first 28 without its use. It seemed too long and just not as basic as the other nine. Almost immediately after the publishing of Euclid’s Elements in ancient times, other mathematicians were critical of it. It just didn’t seem to be self evident and too complicated to be basic. However, all attempts to prove it based on the other nine axioms failed.

One of the principles that Euclid and his early contemporaries followed was that this math system they built was intended to represent the real world they lived in. That is what is meant by the axioms and postulates being “self-evident” and "Earth measurement."

As mathematics matured, scientists started to realize that Geometry, and all of mathematics, was primarily a logical system built on basic and simple assumptions. It was no longer considered that important that it matched the physical world. Even though physical sciences would often use math to measure and prove concepts about the natural world, mathematicians were not convinced that math had to even be “practical.” It was a worthy system in and of itself. More than once mathematicians would develop a branch of math for its own beauty and structure, only to learn later it could be applied to certain physical problems.

For at least a thousand years, geometers were troubled by the disparate complexity of the fifth postulate, and believed it could be proved as a theorem from the other nine. Many attempted to find a proof by contradiction, including Persian mathematicians Ibn al-Haytham (11th century), Omar Khayyám (12th century) and Nasīr al-Dīn al-Tūsī (13th century), and the Italian mathematician Giovanni Girolamo Saccheri (18th century). A proof by contradiction starts assuming a fact is false and then goes on to show that would be a contradiction to the existing system. Therefore, it must be true. So these mathematicians would assume that the postulate was false and then try to develop a result (proof) where that was a contradiction. However, that never worked. Seems that mathematics can be developed that assumes the axiom is false. Yet we know from experience that the rails on a railroad (parallel lines) never meet.

Finally, math learned to embrace the contradiction. They realized there is a consistent Geometry where the fifth postulate is false. Bernhard Riemann, in a famous lecture in 1854, founded the field of Riemannian Geometry, discussing in particular the ideas now called manifolds, Riemannian metric, and curvature. He constructed an infinite family of geometries which are not Euclidean by giving a formula for a family of Riemannian metrics on the unit ball in Euclidean space. The simplest of these is called elliptic Geometry and it is considered to be a non-Euclidean Geometry due to its lack of parallel lines.

A simple view of Euclid’s parallel lines axiom is that two parallel lines will never meet. All other straight lines must intersect — once. Non-Euclidean Geometry assumes that parallel lines do meet or non-parallel lines may cross more than once.

However, most scientists still thought the physical world was “Euclidean.” In the early twentieth century, Einstein demonstrated that space is distorted or curved, a phenomenon caused by both mass and energy. Low and behold, the physical world is non Euclidean. I’ve always thought that was a great irony.

To understand this concept of warped space you have to form an analogy from plane or two dimensional space. Consider most maps. They are two dimensional representations of the earth’s surface, Yet we know the earth’s surface is not flat, it is the surface of a sphere. Of course, for small distances it doesn't’ matter that much, but attempting to display the entire surface of the earth on a flat map causes distortion of size. There are many different methods or “projections” that attempt to reduce the error.

Now consider further an flat map of the Earth. We know there are lines running north and south on maps and globes called longitudinal lines. These lines cross the equator at a right angle, so, by the fifth postulate and its implications, they are parallel. Yet they meet at the poles. We understand that because we know that the lines are on a solid figure called a sphere and we expect that behavior. But if we only view the Earth as a flat plane, then that would be “non-Euclidean.”

Now imagine space in four dimensions. It can be curved and act like the globe and “bend” straight lines, at least that is how it appears to us in three-space.

So we understand how a three dimensional world is distorted when represented on a flat surface or map. Now imagine how to think in four dimensions and understand the distortion of three-space. It’s pretty hard to do.

But it is pretty simple with mathematics. Our current understanding of physics requires thinking in more than three dimensions. Einstein added time as a fourth dimension, but it is more complicated than that when you discuss the "curvature" of space.

Although Euclid’s work contained both shapes and numbers, it was primarily a geometric view of numbers. So the division between the two branches of math: geometry and arithmetic/algebra remained for over a thousand years. Eventually, however, the two disciplines were combined and now we often consider geometry and numbers, arithmetic, algebra, etc. as two sides to the same coin.

Next we will talk about a branch of math that, early on, merged shapes and numbers. We call this branch “Trigonometry” and it started with triangles, but quickly became much broader in application.

Scenic Scenes

Most everyone enjoys a beautiful view. We all hope to have a perspective out the front window of our homes that we can enjoy like a natural painting or photo. In Colorado we like our mountain views and beautiful forests and lakes and streams and grass covered hills. Rolling hills and valleys make an awesome pictorial too.

One thing all these natural beauty views have in common is that they are fairly static. They may change with the seasons, but — in general — they more resemble a still photo than a movie.

But an ocean view is different. It is constantly changing. The surface rolls in and the level ebbs and flows. Plus, there’s a sound track too. The forest has its birds and the wind in the trees, but the ocean has its roar as it comes up on the beach like some amphibian reaching out to dry land. The white noise of the ocean can only be matched by a gurgling stream or a roaring waterfall, and they lack the primordial draw of the sound of the ocean crashing on the beach.

Even the sand changes from day to day and flotsam and jetsam will add new landmarks, modifying the scene overnight.

I’m sitting at the table looking out at the magnificent and fluid view. I spent the last few nights with the windows open allowing access to the timeless sound of the surf. No sleep is more pleasant than the slumber serenaded by the sound of the sea.

My family’s annual trek to the Pacific is a high part of my year. We arrive in September, often better weather on the Oregon coast than the high summer. My brother from Seattle, my sister from Montana, my dad from Portland, and my wife and I from Colorado. All beautiful scenery locations, but none match this awesome ocean views from our house on the cliff overlooking the beach.

This morning we cooperated on breakfast. Dale prepared pancakes that we covered with Huckleberry syrup — a uniquely Montanan sweetener. We had Oregon peaches and a watermelon a friend brought yesterday from her garden. I brewed the coffee, a personal specialty and family favorite. Later we’ll have sea bass caught from a boat a few miles south of here on a leisurely day cruise a couple of days ago. Yesterday, we feasted on salmon caught in Washington by my brother and breads bought at the farmer’s market back near Portland.

It seems we have so much food that we’ll have to have four or five meals a day to finish it off. Some like to go down to the beach and walk on the sand and wade in the water. I’m OK with that. I spent the early hours this morning wandering the beach and picking up shells and other oddities washed up from who-knows-where. But I’m having a great time jus sitting here in the hot tub, drinking wonderful Oregon white wine, and listening to the sea beat on the beach. Besides, those that have sampled the seawater in Oregon know the temperature is not conducive to bathing … unless you are wearing a wet suit. But this hot tub, truly a credit to its name, is so comfy. (I’m actually not in the tub as I type this, but the memory from earlier this week is strong.)

Last night we wandered down to the beach to enjoy a bonfire and play with the neighbor’s dog who sits, lies, and fetches on hand commands. This pup was very well trained. She is owned by a vet assistant and could be a service dog except she was too old when they got her. Still she visits the veterans hospital in Portland and works with the soldiers there. It was great fun to watch the happy dog enjoying fetching a ball and romping in the surf yesterday. It was too dark last night for such play, so she just sat by the fire like the rest of us.

Soon I’m headed south for California. There’s plenty of fine beaches on the way south, but, for now, I’m just soaking up this great scenery … moving pictures and all. Come on in … the water is fine. Today looks like rain, but this week has been the calmest in memory. The wind usually blows on the coast. That’s part of the motion too.

Wednesday, September 4, 2013

Mathematics -- Part Three: Algebra

Algebra can be considered as doing computations similar to that of arithmetic with non-numerical mathematical objects, often represented by letters or other abbreviations. Initially, these objects represented either numbers that were not yet known (unknowns) or unspecified numbers (indeterminate or parameter), allowing one to state and prove properties that are true no matter which numbers are involved. For example, in the quadratic equation,

ax2 + bx + c = 0

a, b, and c are parameters called “coefficients” and x is the unknown. Solving this equation amounts to computing with the variables to express the unknowns in terms of the coefficients. Then, substituting any numbers for the coefficients, gives the solution of a particular equation after a simple arithmetic computation.

You can consider algebra as “abstract” arithmetic where some of the numbers are replaced with letters. You then perform mathematical or arithmetic operations on the letters. This often requires you understand the rules of arithmetic very clearly to perform operations that would be correct for all possible values of the “numbers” including negative values, zero, and even Complex numbers. If given values for the parameters or coefficients, then solve for x. That is algebra.

Another view is that algebra can be used to create a general solution, often called a “formula.” Then all you need to do is substitute actual values for the letters and solve the formula (using arithmetic) to obtain a final result. For example, the solution of the quadratic equation is

This is the “general solution” to the quadratic. This equation and solution is well-known to all graduates of an introductory algebra class. It is part of a group of equations called “polynomials.” Since the highest power in the quadratic equation is 2, this is a second degree polynomial. Less than 2 and it isn’t a “poly.” So the quadratic is the most basic equation of a “non-linear” type. Non-linear means that, if you graph the equation, it is not a straight line. (We will get into graphing equations when we talk about analytical geometry and the connection between the math of numbers and the math of shapes. That’s later in this series.)

There are many ways to solve a quadratic from factoring to completing the square. (Square is where the name “quadratic” came from.) The formula or “general solution” is derived from the latter method. Most remember from that beginning algebra class that there are two solutions or “roots” to a quadratic equation. In the solution formula they come from the “plus-minus” with each sign providing a solution.

There is a proven theorem in mathematics that is so significant it is called the “Fundamental Theorem of Algebra.” It states that, every non-zero, single-variable, degree n polynomial has exactly n roots. (Actually it is a little more complicated than that since the theorem addresses Complex coefficients, but we won’t get into that much detail.)

What this fundamental theorem means is that all second degree polynomial equations (those with the highest power of 2) have 2 roots. In addition, a polynomial equation with cubes will have 3 roots. One with the seventh power will have 7, etc. (It says a little more about the field of complex numbers being algebraically closed, but we REALLY won’t get into that.)

Additionally, it is not fundamental for modern algebra; its name was given at a time when the study of algebra was mainly concerned with the solutions of polynomial equations with real or complex coefficients. And that is exactly where we want to go. A little history of math that bridges the time from the ancient Greeks to the modern rebirth of math during the enlightenment.

Even though the Babylonians didn't have any notion of what an “equation” is, they found the first algorithmic approaches to problems, which would give rise to a quadratic equation today. Their method is essentially one of completing the square. However all Babylonian problems had answers which were positive (more accurately unsigned) quantities since the usual answer was a length.

The first known solution of a quadratic equation is the one given in the Berlin papyrus from the Middle Kingdom (ca. 2160-1700 BC) in Egypt.

In about 300 BC Euclid developed a geometrical approach which, although later mathematicians used it to solve quadratic equations, amounted to finding a length which in our notation was a root of a quadratic equation. Euclid had no notion of equation, coefficients, etc., but worked with purely geometrical quantities.

In his work, Arithmetica, the Greek mathematician Diophantus (ca. 210-290 AD) solved the quadratic equation, but giving only one root, even when both roots were positive. Hindu mathematicians took the Babylonian methods further. Aryabhata around 500 AD gave a rule for the sum of a geometric series that shows knowledge of the quadratic equations with both solutions.

So the general solution to the quadratic has been known since ancient times, before the concept of an equation had evolved and using somewhat sloppy and unproven methods, at least when compared to modern axiomatic-based math. But the method did work and was well known. It was often used in problems involving rectangles like surveying or planting of crops. It was a beginning.

This knowledge was preserved by the Arabs in the Middle East as civilization in Europe collapsed after the fall of Rome. The Hindus also continued to advance algebra, developing nearly modern methods that found both roots, even negative ones; but the Arabs were responsible primarily for preserving the Greek methods and introducing them to Europe after the end of the Dark Ages.

Even the word “algebra” comes from a bit of a mistranslation of Middle Eastern books. The word algebra is a Latin variant of the Arabic word al-jabr. This came from the title of a book, Hidab al-jabr wal-muqubala ("The Compendious Book on Calculation by Completion and Balancing"), written in Baghdad about 825 AD by the Arab mathematician Mohammed ibn-Musa al-Khowarizmi.

Abraham bar Hiyya Ha-Nasi, often known by the Latin name Savasorda, is famed for his book, Liber embadorum, published in 1145, which is the first book published in Europe to give the complete solution of the quadratic equation.

Next came the general solutions for a cubic equation, a polynomial of power 3. Scipione del Ferro (1465-1526), the Chair of Arithmetic and Geometry at the University of Bologna, is credited with solving cubic equations algebraically, but the story is somewhat more complicated. We believe that del Ferro could only solve cubic equation of the form

x3 + mx = n — no second power term.

However, without the Hindu's knowledge of negative numbers, del Ferro would not have been able to use his solution of the one case to solve all cubic equations. Remarkably, del Ferro solved this cubic equation around 1515 but kept his work a complete secret until just before his death, in 1526, when he revealed his method to his student Antonio Fior.

Fior was a mediocre mathematician and far less good at keeping secrets than del Ferro. Soon rumors started to circulate in Bologna that the cubic equation had been solved. Nicolo of Brescia, known as Tartaglia meaning "the stammerer," prompted by the rumors, managed to solve equations of the form x3 + mx2 = n, a slightly different case, and made no secret of his discovery.

Fior challenged Tartaglia to a public contest: the rules being that each gave the other 30 problems with 40 or 50 days in which to solve them, the winner being the one to solve most but a small prize was also offered for each problem. Tartaglia solved all Fior's problems in the space of 2 hours, for all the problems Fior had set were of the form x3 + mx = n, as he believed Tartaglia would be unable to solve this type. However only 8 days before the problems were to be collected, Tartaglia had found the general method for all types of cubics.

News of Tartaglia's victory reached Girolamo Cardan in Milan where he was preparing to publish Practica Arithmeticae (1539). Cardan invited Tartaglia to visit him and, after much persuasion, made him divulge the secret of his solution of the cubic equation. This Tartaglia did, having made Cardan promise to keep it secret until Tartaglia had published it himself. Cardan did not keep his promise. In 1545 he published Ars Magna the first Latin treatise on algebra.

Cardan noticed something strange when he applied his formula to certain cubics. When solving

x3 - 15x = 4

he obtained an expression involving √-121. Cardan knew that you could not take the square root of a negative number yet he also knew that x = 4 was a solution to the equation. He wrote to Tartaglia in August 1539 in an attempt to clear up the difficulty. Tartaglia certainly did not understand. In Ars Magna Cardan gives a calculation with "Complex" numbers" to solve a similar problem, but he really did not understand his own calculation which he said is "as subtle as it is useless."

During the 1500s, solving these complex equations became a form of entertainment and mathematicians would travel the country and hold side shows where they challenged the audience to give them a problem and they would solve it quickly. They were using these general solutions and the search was underway for easy ways to solve harder and harder problems. Who knows how many discoveries were made but kept secret to maintain the "magic" of the show.

In 1540, Cardan was given the following problem: Divide 10 into 3 parts: The parts are in continued proportion and the product of the first 2 is 6

This problem led to a quartic polynomial (power of 4) which Cardan was not able to solve. He gave it to his student, Lodovico Ferrari. Ferrari was the first to develop an algebraic technique for solving the general quartic. He applied his technique (which was published by Cardano ) to the equation

x4 + 6x2 - 60x + 36 = 0

Eventually a more general solution was refined. The general quartic equation is a fourth-order polynomial equation of the form

x4 + a3x3 + a2x2 + a1x + a0 = 0

Although this might not appear completely general as there is no coefficient for the first term, it actually is. You may also wonder where are the minus signs since all these polynomials look like they just use pluses. But the coefficients can be negative, which provides the minus signs.

The general solution for the “biquadratic” or “quartic” polynomial was much more complicated and reduced down to a combination of a linear equation (power of 1) and a quadratic. As this general solution was learned, the race was on to solve even higher power polynomials using general solutions.

Unlike quadratic, cubic, and quartic polynomials, the general quintic cannot be solved algebraically in terms of a finite number of additions, subtractions, multiplications, divisions, and root extractions, as rigorously demonstrated by Neils Henrick Abel (Abel's impossibility theorem) and by Évariste Galois in the early 1800s.

The theoretical work in devising a general, algebraic solution to these polynomials also provided proof that the mathematicians were at the end of the road. There are no general solutions to any higher power polynomials. The road shows had ended and the work shifted to the university and publications. However, further solutions to the quintic form were added in the late nineteenth century and even in 1994 new and more solutions to certain cases of quintic polynomials were added by Spearman and Williams. So these ancient puzzles are still being solved. More significant, however, was the advancements in algebraic theory that were driven by the old side show competitions and the work to put algebra on solid theoretical grounds.

There are lots of areas of algebra that I’ve skimmed over. There are problems with more than one unknown, systems of equations and problems with complex coefficients and other branches of math such as trigonometry.

As it developed, algebra was extended to other non-numerical objects, like vectors and matrices. Then, the structural properties of these non-numerical objects were abstracted to define algebraic structures like groups, rings, fields and algebras. Eventually, algebra was even extended to Geometry.

And that is our next destination: Geometry.

Tuesday, September 3, 2013

Mathematics -- Part Two: Sets

In mathematics, a set is a collection of distinct objects, considered as an object in its own right. For example, the numbers 2, 4, and 6 are distinct objects when considered separately, but when they are considered collectively they form a single set of size three, written {2,4,6}.

Sets are one of the most fundamental concepts in mathematics. Developed at the end of the 19th century, set theory is now a ubiquitous part of mathematics, and can be used as a foundation from which nearly all of mathematics can be derived. Sets are what us older folks that went to school in the days of the one-room school house call “The New Math,” and often struggle helping our elementary school age children with the math because it isn’t how we were originally taught in our day and had these diagrams named after some Swede called "Venn." These days, elementary topics such as Venn diagrams are taught at a young age, while more advanced set concepts are taught as part of a university degree.

You can consider a set as a “bag” that objects are placed in. There is no order in a set (except in an “ordered set”) and the basic concept is membership. An object is either a member of a set or it is not. It’s like a club. (And I’m always reminded of the statement by Groucho Marx that he wouldn’t belong to any club that would allow him to join.) There can be sets within sets, just like a bag within a bag, the so-called subsets.

Although any type of object can be collected into a set, set theory is applied most often to objects that are relevant to mathematics. The language of set theory can be used in the definitions of nearly all mathematical objects.

There are several basic operations that can be performed on a set. Sets can be combined in a number of different ways to produce another set.

Set Union

One operation is called “Union.” In mathematical notation, The Union of sets A and B, denoted by AB, is the set defined as

AB = { x | x ∈ A ∨ x ∈ B }

Well, that is the new math indeed. Looks sort of like Greek. Recall from my first article that I said math was a universal language. Well this is actually a very precise mathematical statement using that universal language. You know that the symbol “∪” means “Union.” The vertical bar (“|”) means “such that” and the “V” looking character (“∨”) stands for the english word “or.” The funny looking “e” (“∈”) stands for membership and is read as “is in” or “is a member of.” So now we can translate that the “union of sets A and B equals all x (or members) such that x is in or is a member of set A or x is a member of set B.

It is much more clear if we use a diagram called a Venn diagram. Venn diagrams consist of circles that represent the set. It is sort of the “bag” that all the members are in. Inside a particular circle are all the member objects and outside are all the objects that are not a member. When showing sets, we assume some objects can be members of two or more sets. The set is shown inside a box called the "Universe," which contains all possible objects of the type being considered, such as all Integers or all numbers. For example, the number 12 is a member of the set of all even numbers and it is also a member of the set of all numbers that are multiples of three.

Here is a Venn diagram for two sets and the Union of those two sets is everything inside either the circle for set A or the circle for set B. The Union is sort of like adding the two sets, only remember a given object can only be a member of a given set “once.” That means the Union is all the members that are only in set A plus all the members that are only in set B plus all the members that are in both sets.

Here’s the diagram

My earlier example was mathematical and used numbers, but set theory is so basic and so powerful that objects can be anything from data records in a computer to human beings, animals, and plants. For example, the Union of the set of all members of the Kiwanis and the set of men in the city of Denver. It is both the powerful generality of sets combined with their very specific language and rules that makes them so useful and allows them to be used to construct the very foundation of arithmetic and all of mathematics. It is a modern answer to an age old problem of putting math on a very solid foundation.

As most people know, in the “old days,” houses were not necessarily built on good foundations. Some houses were built on wood that rotted or on soil that shifted. There were no building codes or modern engineering and some old buildings, like the Tower of Pisa, are now suffering from foundation failure. In the Nineteenth Century, set theory was invented to put all of math on a very good foundation. Consider set theory as the concrete footings of modern math.

This set of blog articles (yes, even articles can be in a set) is just intended to be an introduction to math, not an in depth explanation, so I’ll just cover a few more set operations. This will give you a feeling for what modern set theory is all about in case you didn’t go to a school that taught the “new math.”

Set Intersection

Besides Union, set theory defines an “Intersection.” The Intersection of sets A and B, denoted by AB, is the set defined as

AB = { x | x ∈ A ∧ x ∈ B }

Translating, Intersection of sets A and B equals all x (or members) such that x is in or is a member of set A AND x is a member of set B. (The symbol “∧” stands for “and.”) In other words, the Intersection includes all the objects that are members of both sets. Do you get a feeling that Union and Intersection are sort of like the left hand and right hand. They are closely related, not exactly inverses, but somehow they are “opposite” or “mirror images” of each other.

Here is the Venn diagram for Intersection.


I will cover one more set operation. That is the previously mentioned concept of “subset.” That is a set contained within a set. An example would be the set of all citizens of the United States. It contains a subset that is all the women who are citizens of the United States or all citizens of the United States that receive Social Security checks. The subset must be wholly contained within the outer set (called the "superset") to be a subset.

Here’s the Venn diagram.

So if set A is a subset of set B, then every member of set A is also a member of set B. It is logical to think of the subset as a smaller set, but it is possible that both sets are the same size. That is, they have the same number of members. Consider the set of all even numbers which is a subset of all numbers that are divisible by two. Actually, they are the same set. One is a subset of the other and vice-versa, which is the definition of set equality. Usually, though we consider subsets as “smaller” or less members than the superset. A subset that has less members than the superset is called a “proper” subset.

There’s a lot more set operations including set difference, complements, ordered pairs, cartesian products, n-tuples, and equality. All together it is a powerful notation and concepts for describing other mathematical concepts. That’s the point. Prove something with set theory and then you’ve proved it for other branches of math that can be “mapped” to set theory, and that’s about all of mathematics. It is simple enough to teach to elementary school kids and powerful enough to use in a graduate math course. Set theory can also be used to expand mathematics into other areas such as computer database operations and other Computer Science subjects or topics such as anthropology or botany or the theory of games. Sets, in a sense, are the most basic mathematics; even more basic than numbers.

Number Sets

The symbol for subset is “⊂,” although that is actually the symbol for proper subset or the so-called “strict” subset. In the first chapter of this Mathematics series I defined sets of numbers such as the Natural numbers, Integers, Reals, and Complex. We can now use set notation to indicate the relationships between these sets. I’ll use some special symbols for the numeric families.

Natural Numbers (counting numbers) = ℕ
Integer = ℤ
Rational = ℚ
Real = ℝ
Complex = ℂ
Universal Set (all possible values) = U (I couldn’t find the html symbol for “U.” It looks like the others above.)

ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ ⊂ U

You can use set notation to define sets. For example:

ℝ = ℚ ∪ ℚ'

where " ' " represents not. That is, the Irrationals are the numbers that are not Rational. (Not exactly true since Complex numbers are also in the Universe. So it can depend on what you define as the Universe, but be careful of circular definitions … just like the caution in grammar. In this case we interpret ℚ' as "Irrational," that is all Real numbers that are not Rational.)

The better formed equation would be ℚ' = ℝ − ℚ. (You may have guessed that there is set "subtraction" and it removes members.)

You may be curious about how these labels were chosen. Obviously, we don't use "R" for Rational since it is used for "Real." You can consider "Q" as "quotient" because the Rational numbers are all formed as the quotient, or division, or fraction with two Integers. The Integers use "Z" from the German word for "number," "Zahlen." These symbols were developed in the '30s and are now accepted in mathematical notations. They started being used in scientific papers and then in text books and now they are the standard.

Of course, using "I" for Integers would be confused with Irrationals and even Imaginary numbers. Due to alphabetic confusion, in electronics engineering, where "I" is used for Current ("Intensity" of Current, "C" was already taken for "Capacitance" … I know … too complicated.) So, in EE you use j instead of i for √−1to keep from confusion with current.

Now let's talk about the two letter abbreviations for the states … just kidding.

Many mathematical concepts can be defined precisely using only set theoretic concepts. For example, mathematical structures as diverse as graphs, manifolds, rings, and vector spaces can all be defined as sets satisfying various (axiomatic) properties. Equivalence and order relations are ubiquitous in mathematics, and the theory of mathematical relations can be described in set theory.

Sets can be used as an abstraction of arithmetic. In reality, all of mathematics is a form of abstraction. Even the numbers are abstractions. What does it mean to talk about “seven”? What is 7? I can explain what seven dollars are, or seven cupcakes, but what is “seven”? It is an abstraction. It is a representation. And … we can use it for keeping track of our dollars and our cupcakes.

The next topic is “algebra.” That’s an abstraction of arithmetic. Instead of “7,” we will let “x” stand for the number of cupcakes. That’s next in Mathematics — Part Three: Algebra.

Monday, September 2, 2013

Mathematics -- Part One: Arithmetic

The term “arithmetic” comes from the Greek word "ἀριθμός," pronounced “arithmos” which means "number." It is the oldest and most elementary branch of mathematics. It is used for counting, balancing checkbooks, and advanced science and business calculations. It involves the study of quantity, especially as the result of operations that combine numbers. In common usage, it refers to the simpler properties when using the traditional operations of addition, subtraction, multiplication and division with smaller values of numbers. More precisely, this is “elementary arithmetic” in contrast with the so called “higher” or “advanced” arithmetic, which is about number theory.

Besides the basic operations of addition, etc., there are other concepts such as equality and various representations called “notation.” That’s the way that numbers, fractions, exponents, etc. are expressed. This notation has been invented and evolved over the centuries and is a common language in the world. Whether English or French or Chinese or Russian or African or from India, the notation and the symbols for the modern ten digits and the mathematical operations are the same. They may add a slash to the seven in Europe or a stroke through the zero in the Army, but in our world of multiple languages, the language of mathematics is universal. That, in itself, is something to ponder philosophically.

Virtually all ancient cultures understood arithmetic and basic calculations encountered in agriculture and store keeping. Arithmetic is closely related to the system for representing numbers and basic counting. Early math history is more about the advancement of notation with more modern studies of arithmetic focused on proving the correctness of results. The ancients were happy if the math fit common sense, but we now have a complex system of axioms and proofs at the heart of all math including arithmetic.

Various mechanical devices such as the abacus or the more modern adding machine and even digital computers have been developed to “crunch numbers.” These replaced the use of simple fingers for counting which share the term “digits” with these numerical symbols. Some cultures had a base of 60 and even 360, values we still see on clocks and compasses, but most gravitated toward the decimal or “ten-based” system although other concepts such as "dozen" still exist.

As the science of arithmetic advanced, new number types were discovered in addition to the counting numbers from the negative numbers to zero to fractional numbers and even imaginary numbers. The simplest set of numbers is called the counting numbers or “Natural Numbers.” They start with 1 and increase by adding 1 to each preceding number: 1, 2, 3, etc. Formally, these counting numbers are called the Positive Integers. Add zero and the negative values and you have the whole of the Integers.

Negative numbers first appeared as the result of subtraction and were used to represent financial concepts such as debt. Zero was actually a little harder to develop since the concept of nothing was challenging to early societies, but zero soon entered the lexicon. Note that the Zero is neither Positive nor Negative, but represents the boundary between the two sets when shown on the “Number Line.”

Fractional numbers also were an early development, often stated as a fraction with a numerator or “top” and a denominator or “bottom.” They were the natural result of division, and — in fact — a fraction is one way to represent division. The division symbol (÷) is also recognizable as an abstraction of a fraction with the two dots representing the numerator and denominator.

All the numbers that can be formed by making fractions of Integers were called by the Greeks the “Rational” Numbers. We often think of these as “decimal” numbers in modern math where the “decimal point” separates the whole number part from the fractional part.

When the Greeks first leaned there were fractional numbers that weren’t constructed from Integer fractions they were shocked. Legend says that a member of the Pythagorean school who showed that the square root of 2 was not such a number was thrown into the sea to drown for his heresy. Once they became convinced of the existence of such numbers, then the Greeks began calling values like the square root of two “Irrational.” We later leaned that some natural constants such as pi are also Irrational. Therefore, the numbers that could be formed from fractions of Integers were called the Rationals. Those that could not be formed from a division of Integers were called Irrational.

Not only can’t Irrational Numbers be represented as a fraction of Integers, but as decimals they never repeat or terminate. Rationals do. For example, 1/2 = 0.5 and 1/3 = 0.333… to infinity. Note that you could consider 1/2 as repeating without end if you view it as 0.5000…. The numbers in pi, on the other hand, never repeat no matter how many digits you expand the decimal: 3.1415926535897932385…

Now days we consider the Rational numbers plus the Irrational numbers as a set called the “Real” numbers. All the Real numbers can be represented as a point on a number line. That’s sort of like a ruler or scale drawn on paper. Zero is in the center and the positive numbers extend to the right (toward infinity) and the negative numbers extend to the left (toward negative infinity). You can imagine both 2 and 3 as well as 2.5 or 1/3 and even the square root of 2 (about 1.4) as points on the number line or scale.

Mathematicians also considered what appeared to be impossible numbers such as the square root of minus 1, a number that would seem to not exist, and therefore is called “Imaginary.” The square root of minus one is a number that, when squared, equals minus one. But all numbers, when squared or multiplied by themselves, produce positive numbers. Therefore, it would appear that the square root of -1 does not exist except in the imagination of the mathematician. The square root of minus one is often represented by the lowercase letter "i," usually in italics: i. By definition, that is we simply declare it to be true, i = √-1.

Imaginary numbers can’t be represented on a number line, although they can be represented using a Cartesian graph. In fact, a major use of Complex Numbers is to represent multidimensional values and Cartesian coordinates.

“Complex Numbers” consist of the set of Reals and the set of Imaginary numbers combined. They are written as the sum of the real component and the imaginary component: R ± i I.

So, in terms of membership, the largest collection is the Complex Numbers made up of Real + Imaginary. The Reals are made up of Rational plus Irrational Numbers, and the Rational Numbers include both Integers and Fractional numbers. Finally, the Integers include the Natural Numbers plus the Negative Integers and Zero.

It seems like many of these problem numbers came from square roots, and you could question if a square root is a basic arithmetic operation, but square roots are a natural extension of the inverse of multiplication, and multiplication is just accumulated addition, so it is among the basic operations. (An inverse is an operation that “undoes” another operation. Subtraction is the inverse of addition and division is the inverse of multiplication. Repeated multiplication is called exponentiation or “powers” and roots are an inverse of that. ((There is actually another inverse of exponentiation called logarithms. It is part of arithmetic too.)) )

So you can argue that all the trouble started with simple addition and its inverse. Arithmetic is just numbers and these simple and extended operations on numbers. Seems more complicated than just 2 + 2, but it actually grows naturally out of that basic equation or formula.

Usually the purpose of all forms of higher math is to, eventually, get back to arithmetic and numbers. (Not always true, but often true.) Ultimately, arithmetic and numbers give us the answer we usually seek. Saying math is all about numbers is a bit over simplified because geometry, also a part of math, isn’t about numbers directly, although we now realize geometry and algebra can be combined; something called “analytic geometry.” So, one can argue that it all started with numbers. 1, 2, 3, … infinity.

(By the way, infinity is not a number. It is a concept and a destination and a limit, but it is not a number.)

Next we will continue to study numbers and arithmetic, resulting in the modern concept of “sets” and the following article titled “Mathematics -- Part Two: Sets.”