display | more...
mathematical term for a rectangular array of numbers.
A matrix is said to be an mxn (read "m by n") matrix if it has m rows and n columns. Ie. A 4x4 matrix looks like this:

| 1 2 3 4 |
| 2 2 2 2 |
| 3 5 3 3 |
| 4 4 4 4 |

Each entry in the matrix is denoted as a_i,j where i is the row number and j is the column number
Ie. in the example 4x4 matrix the a_3,2 entry is equal to 5
It pains me to no end to find that, in this entire group, only cursory mention has been made of matrices beyond two dimensions.

A matrix may have any number of dimensions, and are commonly found with more than two. Applications, from processor design to image processing to plasma dynamics, rely on 4, 6, or 9 dimensional matrices.

Admittedly, in college, most students will only encounter two dimensional matrices in linear algebra classes or books about world-camera-eye-screen coordinate transforms for 3d rendering. It should be noted that the techniques used in linear algebra (conjugate gradient method, LU and Cholesky decomposition) can be useful with matrices of dimension N(where N is a number between 2 and ...For some reason, alt+236 doesn't work.).

Still, I think that multi-dimensional matrices deserve mention, as I wasted an entire year staring at 4d Toeplitz block Toeplitz matrices, costing me an unrecoverably large portion of my sanity.

To answer -brazil-'s comment on my wu (see below), a second order tensor is often written as a 3x3 matrix, as a tensor of order n requires 3n numbers to be represented, but a tensor is much more than just 3n numbers. The key element of a tensor is the transformation law of its components through coordinate systems. To softlink "tensor" wouldn't really help much, as -brazil- has made the same mistake in his tensor wu.

Of course, if this really is true, that matrices are much more limited than previously thought, then we should notify mathematicians and physicists the world over, as their works have been rendered worthless. grin

The matrix is also the name for the centre of mitochondria found in cells, and is where a large proportion of aerobic respiration takes place.

The matrix is also the name for the background material in a composite, for instance carbon composites are usually carbon fibres imbedded in a resin matrix.

math-out = M = maximum Maytag mode

Matrix n.

[FidoNet] 1. What the Opus BBS software and sysops call FidoNet. 2. Fanciful term for a cyberspace expected to emerge from current networking experiments (see the network). The name of the rather good 1999 cypherpunk movie "The Matrix" played on this sense, which however had been established for years before. 3. The totality of present-day computer networks (popularized in this sense by John Quarterman; rare outside academic literature).

--The Jargon File version 4.3.1, ed. ESR, autonoded by rescdsk.

Note: here are some details about matrices that haven't been addressed yet in the above writeups.

Matrices play a very important part in maths, particularly in the field of linear algebra. A bidimensional matrix is, as said above, a collection of numbers (or polynomials, or colours or anything you fancy) arranged in rows and columns like this:

```+ 3 2 1 5 +
| 2 1 0 1 |
+ 1 0 2 1 +
```

(To get tridimensional matrices, you can stack bidimensional matrices of a same size and so forth)

The most common way to refer to matrices is with capital letters, especially A,B,C, ... or M. To represent individual cells of the matrix we use the matrix's name in lowercase and subscripts to indicate the row and column we are refering to. If we name the above matrix M, then m1 4 would be 5. The indexes i and j are often used to refer to general positions on the matrix, and the following notation is also used:

M=(mi j)

Matrix sizes are often expressed as NxM where N is the number of rows and M the number of columns.

Another common technique is to divide matrices into smaller matrices. For example, 4x4 matrices are used for tridimensional transforms. This 4x4 matrix is divided into 4 four parts like this:

```+ R | T +
+ --+-- +
+ P | 1 +
```

Where R is a 3x3 which contains rotation, T is a 3x1 matrix that specifies a translation, P is a 1x3 matrix that performs perspective and 1 is well, a 1x1 1 :)

What does one use matrices for? They are an extremely compact way to express a lot of things. For example, a system of linear equations of the following form:

a1 1x1 + ... + a1 mxm = b1
a2 1x1 + ... + a2 mxm = b2
...
an 1x1 + ... + an mxm = bn

Can be represented with an NxM+1 matrix like this:

```+ a11 a12 a13 ... a1m b1 +
| a21 a22 a23 ... a2m b2 |
|  .   .   .  .    .   . |
|  .   .   .   .   .   . |
|  .   .   .    .   .  . |
+ an1 an2 an3 ... anm bn +
```

The above representation lets us perform linear row operations quickly and saving ourselves for writing lots of x's, +'s and ='s.

As seen on the example before about splitting matrices, they are an essential tool for n-dimensional geometry. A vector or a point in an n-dimensional space can be represented using either row vectors or column vectors, that is, the vector's components laid out in an 1xN or Nx1 matrix. Using one additional dimension and putting an 1 as the last component, lets us write translation and rotation using homogenous transforms.

Of course, matrices have applications outside maths. Just remember that most tables are in fact matrices. A timetable is just a matrix over a subjects space!

A new writing instrument made by the Cross company. It could easily be described as a “multipen.” On one end (next to the clip), it can be turned either way, to project a red or blue ball point pen (depending on which way you twist). At the other end is a stylus for your favorite PDA.

So far, this is not unlike any other multipen, save for the location of the different modes. However, the part with the stylus can pull out, to reveal either a roller ball pen, or, best of all, a fountain pen. This makes it quite unique. Now, you can have one instrument that can be your stylus, a ballpoint, and a real pen.

This one does not take standard Cross refills for the ballpoints. Unfortunately, the fountain pen part only takes cartridges.

## (Or, Why Your Keyboard Doesn't Have One Hundred and One Wires Sticking Out of It)

There is still a definition of "matrix" that isn't covered here. In electronics, a "matrix" is a method of multiplexing multiple input or output lines onto a grid, in order to decrease the number of control lines needed for I/O. Perhaps a demonstration is in order.

As you may or may not be aware, a simple logic switch circuit usually looks something like this:

```             button
__|__      low res.
Input >---+--*   *------/\/\/----> +Vcc
|             i.e. 10KOhm
>
> high res.
> i.e. 1MOhm
|
===
=  GND
```

When the switch is not pressed, the input is pulled to ground (which is usually logic zero) through the resistor. When the switch is pressed, the lower impedance resistor overrides the higher one, and the input will be pulled high (logic one). (If you don't have a background in electronics, you may wonder why the two resistors and connection to ground are required at all; the reason is that, without them, the input would be left floating (not electrically connected to anything) when the button is not pressed, and that's a very bad thing where digital logic is concerned.)

Now, you could create a set of keys by just repeating this circuit, but you would need a separate input pin for every single key! This might be fine for four or five keys, but not for a 16-key keypad, or an entire keyboard. So we multiplex multiple keys across each input pin.

Let's say, for simplicity, we have a 3x3 keypad, as below:

```            Strobes
A     B     C
|     |     |
>     >     >
>     >     >
>     >     >
|     |     |
I 1 -----O-----O-----O---/\/\/---+
N        |     |     |           |
P        |     |     |           |
U 2 -----O-----O-----O---/\/\/---+
T        |     |     |           |
S        |     |     |           |
3 -----O-----O-----O---/\/\/---+
|
===
=  GND
```

In this diagram, each of the O's represents a switch, which when depressed, forms an electrical connection between a horizontal line and a vertical line. If, for example, switch B1 is pressed, lines B and 1 will be shorted together.

Now, this circuit as it stands isn't going to be very helpful, because nothing is connected to anything. But if you just connect all the strobes to logic high at once, you're going to have a problem: any one of the switches on a row will pull that input high, and you won't be able to distinguish which column caused it!

The answer lies in the name of the strobe lines: we take turns turning each one on, reading the input pins, and then turning the strobe off and moving on to the next one. This is, as you might guess, called strobing the pins. It is done fast enough that it's not possible for the microcontroller (or whatever is connected to the inputs) to "miss" a keypress on one strobe while it has another strobe turned on. The algorithm for reading the keypad diagrammed above would look something like this:

```Turn off all strobes.
While (program is running)
{
Turn on strobe A.
Wait a few microseconds for circuit to stabilize.
Read input pins (these are the states of keys A1, A2, and A3).
Turn off strobe A.
Turn on strobe B.
Wait a little while again.
Read input pins (B1 to B3).
Turn off strobe B.
Turn on strobe C.
Wait a bit once more.
Read input pins (C1 to C3).
Turn off strobe C.
```

Pretty simple, isn't it? There are a few other electrical design details, of course: you would typically want the strobes to only be driven strongly (meaning the connection to positive voltage is through a resistor with low impedance) when high, and to be driven very weakly or be left floating (known as Hi-Z meaning "high impedance") when low1; otherwise, the strobes could potentially "fight" each other to drive an input line. You would probably also have diodes at each of the key locations, so that current could only flow from the strobe lines to the input lines, and not the other way around.

This same procedure can be used for outputs, instead of inputs -- instead of reading input pins, you set output values, and place output devices (such as LEDs) at the junctions where the switches would be. If each strobe line goes "high" when it is being strobed, than setting an output line "low" will cause current to flow from the high strobe line to the low input line, lighting that LED (or whatever is at the junction). The trick is that the strobing has to be fast enough that the LED refresh rate will be faster than the human eye can percieve, or they will appear to flicker2. This is how large LED scoreboards and displays (like the Jumbotron) operate, and is also the basic principle behind LCDs and other matrix displays. (And it's a good thing, too; can you imagine a 640x480 LCD panel requiring 307,200 output pins!?)

You can even use the same strobe lines both for monitoring input lines and setting output lines, further cutting down on pin count! Many front-panel interfaces such as those on refrigerator ice dispensers and vending machines operate in this fashion.

Finally, in the end, the real reason why your keyboard doesn't have 101 wires sticking out of it is that the matrix encoder is built right into the keyboard. The data is then transmitted serially over the PS/2 interface to the computer. If you've ever had a keyboard spit out spurious keypresses at random, or output the wrong codes for certain keys, the malfunction is almost certainly due to a damaged matrix encoder, or possibly a short or open circuit in the key matrix itself.

Now you know, and knowing is half the battle.

1On some microcontrollers, outputs that are strongly driven when high and Hi-Z when low are called multi-drive pins.

2Incidentally, if you were to purposely slow the strobe rate down far below the speed of human perception, and pull all of the output lines low, you will have just created a set of chaser lights!

Ma"trix (?), n.; pl. Matrices (#). [L., fr. mater mother. See Mother, and cf. Matrice.]

1. Anat.

The womb.

All that openeth the matrix is mine. Ex. xxxiv. 19.

2.

Hence, that which gives form or origin to anything

; as: (a) Mech.

The cavity in which anything is formed, and which gives it shape; a die; a mold, as for the face of a type.

(b) Min.

The earthy or stony substance in which metallic ores or crystallized minerals are found; the gangue.

(c) pl. Dyeing

The five simple colors, black, white, blue, red, and yellow, of which all the rest are composed.

3. Biol.

The lifeless portion of tissue, either animal or vegetable, situated between the cells; the intercellular substance.

4. Math.

A rectangular arrangement of symbols in rows and columns. The symbols may express quantities or operations.

Log in or register to write something here or to contact authors.