General N-Dimensional Rotations

Total Page:16

File Type:pdf, Size:1020Kb

General N-Dimensional Rotations General n-Dimensional Rotations Antonio Aguilera Ricardo Pérez-Aguila Centro de Investigación en Tecnologías de Información y Automatización (CENTIA) Universidad de las Américas, Puebla (UDLAP) Ex-Hacienda Santa Catarina Mártir México 72820, Cholula, Puebla [email protected] [email protected] ABSTRACT This paper presents a generalized approach for performing general rotations in the n-Dimensional Euclidean space around any arbitrary (n-2)-Dimensional subspace. It first shows the general matrix representation for the principal n-D rotations. Then, for any desired general n-D rotation, a set of principal n-D rotations is systematically provided, whose composition provides the original desired rotation. We show that this coincides with the well-known 2D and 3D cases, and provide some 4D applications. Keywords Geometric Reasoning, Topological and Geometrical Interrogations, 4D Visualization and Animation. 1. BACKGROUND arctany x x 0 arctany x x 0 The n-Dimensional Translation arctan2(y, x) 2 x 0, y 0 In this work, we will use a simple nD generalization of the 2D and 3D translations. A point 2 x 0, y 0 x (x1 , x2 ,..., xn ) can be translated by a distance vec- In this work we will only use arctan2. tor d (d ,d ,...,d ) and results x (x, x ,..., x ) , 1 2 n 1 2 n 2. INTRODUCTION which, can be computed as x x T (d) , or in its expanded matrix form in homogeneous coordinates, The rotation plane as shown in Eq.1. [Ban92] and [Hol91] have identified that if in the 2D space a rotation is given around a point, and in the x1 x2 xn 1 3D space it is given around a line, then in the 4D space, in analogous way, it must be given around a 1 0 0 0 plane. 0 1 0 0 (Eq. 1) x1 x2 xn 1 [Hol91] considers that rotations in 3D space must be 0 0 1 0 considered as rotations parallel to a 2D plane instead of rotations around an axis. [Hol91] supports this d d d 1 1 2 n idea considering that given an origin of rotation and a destination point in the 3D space, the set of all The arctan2 function rotated points for a given rotation matrix lie in a If tan( ) m , then arctan(m) . Moreover, if we single plane, which is called the rotation plane. know that tan( ) y x , then a better well-known Moreover, the rotation axis in the 3D space coincides with the normal vector of the rotation plane. The solution is arctan2( y, x) , where concept of rotation plane is consistent with the 2D space because all the rotated points lie in the same Permission to make digital or hard copies of all or part of and only plane. Finally, with the above ideas, this work for personal or classroom use is granted without [Hol91] constructs all six basic 4D rotation matrices fee provided that copies are not made or distributed for around the main planes in 4D space. profit or commercial advantage and that copies bear this notice and the fill citation on the first page. To copy Main n-Dimensional Rotations otherwise, or republish, to post on servers or to redistribute We know that in the 3D space, rotations are defined to lists, requires prior specific permission and/or a fee. in terms of the axis around they take place. However, we know that it is more appropriate to consider that WSCG SHORT Communication papers proceedings WSCG'2004, February 2-6, 2004, Plzen, Czech Republic. 3D rotations take place in a plane embedded in the Copyright UNION Agency - Science Press 3D space (the plane’s normal vector coincides with the rotation axis). Using these ideas, [Duf94] genera- View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by DSpace at University of West Bohemia lizes the concept of a main rotation in an nD space key points that will be very useful when extending (n 2) as the rotation of an axis Xa in direction to an them to the nD case. Moreover, the 3D case will be presented in a way that facilitates its generalization axis Xb. The plane described by axis Xa and Xb is to nD. what [Hol91] defined as rotation plane. [Duf94] pre- sents the following general matrix for main rotations: General 2D Rotations ra,a cos( ) Since the main 2D rotation R1,2 is around the origin, r cos( ) b,b a general rotation of an angle around a fixed point ra,b sin( ) a (a1,a2 ) can be obtained by the following Ra,b ( ) ri, j r sin( ) composition: , which is b,a x x T( a) R1,2 ( ) T(a) rj, j 1, j a, j b expanded as shown in Eq. 2 Note that the inverse r 0 elsewhere matrix of T (a) is T (a) . i, j For an n-dimensional rotation, this is an n n matrix, General 3D Rotations or an (n 1) (n 1) matrix if homogeneous A general 3D rotation is a rotation of an angle coordinates are used. It can easily be verified that in around a general axis. This axis, in this work, will be represented by the supporting line of the directed the 2D space, R1,2 corresponds to the positive segment S ab (a 1D simplex), where (counter clockwise) rotation around the origin, while (0) (0) (0) (0) (0) (0) a (a1 ,a2 ,a3 ) and b (b1 ,b2 ,b3 ) are two R2,1 corresponds to the negative (clockwise) rotation non-coincident 3D points which we will refer as the 1 around the origin, moreover . Similarly in R1,2 R2,1 vertices of S. See Fig 1.(i). The positive direction of the 3D space, R1,2 , R2,3 and R3,1 respectively the rotation is given by the right hand rule (pointing with your right thumb from a to b, the remaining four correspond to a positive rotation around axes X , X , 3 1 curved fingers describe the positive direction). This and X (ie., axes Z, X, and Y) while the 2 rotation can be achieved as the composition of a corresponding negative rotations are R , R and 2,1 3,2 number of transformations, which firstly aligns R1,3 , which, by the way, are the corresponding segment S with any of the main axis, secondly performs the desired rotation around that main axis, inverse matrices of R1,2 , R2,3 and R3,1 . and thirdly returns the rotation axis to its original Observation 1. Matrix Ra,b ( ) is almost an identity position by performing the inverse of those transformations in reverse order. matrix except in the intersection of columns a and b (0) (0) (0) with rows a and b, which means that only the (0) a1 a2 a3 Let v be the matrix for the coordinates a and b of a point will change after a (0) (0) (0) b1 b2 b3 Ra,b ( ) rotation, which is consistent with the 3D and original vertices’ coordinates, let M k be the 2D cases. corresponding matrix for the k th transformation. n (0) (1) (2) (k ) (k 1) Observation 2. Since there are C main planes in Then v , v , v ,..., where v v M k , is a 2 series of matrices holding the vertices coordinates at a nD space, this is precisely the number of main (k ) (k ) (k ) (k ) a1 a2 a3 rotations for such space. each step, v , or simply (k ) (k ) (k ) b1 b2 b3 Observation 3. Let ek (1 k n) be the unit vector (k ) (k ) a along axis Xk, in the nD space, then . v (k ) b ea Ra,b ( / 2) eb , i.e., Ra,b moves a point on Xa towards Xb. In this work, the chosen main axis where the segment 3. FROM MAIN TO GENERAL S will be directed to, is X1. The first step is to move point a to the origin, therefore, M T (a) ROTATIONS 1 (1) 0 0 0 which makes Although the following discussions can be found in v (1) (1) (1) b b b any text book (see Hearn & Baker [Hea96] for 1 2 3 (1) (0) (0) example), they are included here to underline some where b b a , j 1,2,3. See Fig. 1.(ii). j j j 1 0 0 cos( ) sin( ) 0 1 0 0 (Eq. 2) x x 1 x x 1 0 1 0 sin( ) cos( ) 0 0 1 0 1 2 1 2 a1 a2 1 0 0 1 a1 a2 1 i) ii) x x M , where M M M M M M M M X2 X2 1 2 3 4 5 6 7 and it is usually computed in advance. b General 4D Rotations a A general 4D rotation is a rotation of an angle X1 X1 around a general plane. This plane, in this work, will be represented by the supporting plane of a triangle T abc (a 2D simplex), where X3 X3 (0) (0) (0) (0) (0) (0) (0) (0) a (a1 ,a2 ,a3 ,a4 ) , b (b1 ,b2 ,b3 ,b4 ) and (0) (0) (0) (0) X2 X2 c (c1 ,c2 ,c3 ,c4 ) are three non-collinear 4D points which we will refer as the vertices of T. This rotation can be achieved as the composition of a number of transformations, which firstly takes X1 triangle T onto main plane X1X2, so that edge ab of T X1 is aligned with axis X1, secondly it performs the desired rotation around main plane X1X2, and thirdly it returns triangle T to its original position by X3 iii) X3 iv) performing the inverse of those transformations in Figure 1.
Recommended publications
  • Quaternions and Cli Ord Geometric Algebras
    Quaternions and Cliord Geometric Algebras Robert Benjamin Easter First Draft Edition (v1) (c) copyright 2015, Robert Benjamin Easter, all rights reserved. Preface As a rst rough draft that has been put together very quickly, this book is likely to contain errata and disorganization. The references list and inline citations are very incompete, so the reader should search around for more references. I do not claim to be the inventor of any of the mathematics found here. However, some parts of this book may be considered new in some sense and were in small parts my own original research. Much of the contents was originally written by me as contributions to a web encyclopedia project just for fun, but for various reasons was inappropriate in an encyclopedic volume. I did not originally intend to write this book. This is not a dissertation, nor did its development receive any funding or proper peer review. I oer this free book to the public, such as it is, in the hope it could be helpful to an interested reader. June 19, 2015 - Robert B. Easter. (v1) [email protected] 3 Table of contents Preface . 3 List of gures . 9 1 Quaternion Algebra . 11 1.1 The Quaternion Formula . 11 1.2 The Scalar and Vector Parts . 15 1.3 The Quaternion Product . 16 1.4 The Dot Product . 16 1.5 The Cross Product . 17 1.6 Conjugates . 18 1.7 Tensor or Magnitude . 20 1.8 Versors . 20 1.9 Biradials . 22 1.10 Quaternion Identities . 23 1.11 The Biradial b/a .
    [Show full text]
  • Interaction of the Past of Parallel Universes
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by CERN Document Server Interaction of the Past of parallel universes Alexander K. Guts Department of Mathematics, Omsk State University 644077 Omsk-77 RUSSIA E-mail: [email protected] October 26, 1999 ABSTRACT We constructed a model of five-dimensional Lorentz manifold with foliation of codimension 1 the leaves of which are four-dimensional space-times. The Past of these space-times can interact in macroscopic scale by means of large quantum fluctuations. Hence, it is possible that our Human History consists of ”somebody else’s” (alien) events. In this article the possibility of interaction of the Past (or Future) in macroscopic scales of space and time of two different universes is analysed. Each universe is considered as four-dimensional space-time V 4, moreover they are imbedded in five- dimensional Lorentz manifold V 5, which shall below name Hyperspace. The space- time V 4 is absolute world of events. Consequently, from formal standpoints any point-event of this manifold V 4, regardless of that we refer it to Past, Present or Future of some observer, is equally available to operate with her.Inotherwords, modern theory of space-time, rising to Minkowsky, postulates absolute eternity of the World of events in the sense that all events exist always. Hence, it is possible interaction of Present with Past and Future as well as Past can interact with Future. Question is only in that as this is realized. The numerous articles about time machine show that our statement on the interaction of Present with Past is not fantasy, but is subject of the scientific study.
    [Show full text]
  • 1 Lifts of Polytopes
    Lecture 5: Lifts of polytopes and non-negative rank CSE 599S: Entropy optimality, Winter 2016 Instructor: James R. Lee Last updated: January 24, 2016 1 Lifts of polytopes 1.1 Polytopes and inequalities Recall that the convex hull of a subset X n is defined by ⊆ conv X λx + 1 λ x0 : x; x0 X; λ 0; 1 : ( ) f ( − ) 2 2 [ ]g A d-dimensional convex polytope P d is the convex hull of a finite set of points in d: ⊆ P conv x1;:::; xk (f g) d for some x1;:::; xk . 2 Every polytope has a dual representation: It is a closed and bounded set defined by a family of linear inequalities P x d : Ax 6 b f 2 g for some matrix A m d. 2 × Let us define a measure of complexity for P: Define γ P to be the smallest number m such that for some C s d ; y s ; A m d ; b m, we have ( ) 2 × 2 2 × 2 P x d : Cx y and Ax 6 b : f 2 g In other words, this is the minimum number of inequalities needed to describe P. If P is full- dimensional, then this is precisely the number of facets of P (a facet is a maximal proper face of P). Thinking of γ P as a measure of complexity makes sense from the point of view of optimization: Interior point( methods) can efficiently optimize linear functions over P (to arbitrary accuracy) in time that is polynomial in γ P . ( ) 1.2 Lifts of polytopes Many simple polytopes require a large number of inequalities to describe.
    [Show full text]
  • Vectors, Matrices and Coordinate Transformations
    S. Widnall 16.07 Dynamics Fall 2009 Lecture notes based on J. Peraire Version 2.0 Lecture L3 - Vectors, Matrices and Coordinate Transformations By using vectors and defining appropriate operations between them, physical laws can often be written in a simple form. Since we will making extensive use of vectors in Dynamics, we will summarize some of their important properties. Vectors For our purposes we will think of a vector as a mathematical representation of a physical entity which has both magnitude and direction in a 3D space. Examples of physical vectors are forces, moments, and velocities. Geometrically, a vector can be represented as arrows. The length of the arrow represents its magnitude. Unless indicated otherwise, we shall assume that parallel translation does not change a vector, and we shall call the vectors satisfying this property, free vectors. Thus, two vectors are equal if and only if they are parallel, point in the same direction, and have equal length. Vectors are usually typed in boldface and scalar quantities appear in lightface italic type, e.g. the vector quantity A has magnitude, or modulus, A = |A|. In handwritten text, vectors are often expressed using the −→ arrow, or underbar notation, e.g. A , A. Vector Algebra Here, we introduce a few useful operations which are defined for free vectors. Multiplication by a scalar If we multiply a vector A by a scalar α, the result is a vector B = αA, which has magnitude B = |α|A. The vector B, is parallel to A and points in the same direction if α > 0.
    [Show full text]
  • Simplicial Complexes
    46 III Complexes III.1 Simplicial Complexes There are many ways to represent a topological space, one being a collection of simplices that are glued to each other in a structured manner. Such a collection can easily grow large but all its elements are simple. This is not so convenient for hand-calculations but close to ideal for computer implementations. In this book, we use simplicial complexes as the primary representation of topology. Rd k Simplices. Let u0; u1; : : : ; uk be points in . A point x = i=0 λiui is an affine combination of the ui if the λi sum to 1. The affine hull is the set of affine combinations. It is a k-plane if the k + 1 points are affinely Pindependent by which we mean that any two affine combinations, x = λiui and y = µiui, are the same iff λi = µi for all i. The k + 1 points are affinely independent iff P d P the k vectors ui − u0, for 1 ≤ i ≤ k, are linearly independent. In R we can have at most d linearly independent vectors and therefore at most d+1 affinely independent points. An affine combination x = λiui is a convex combination if all λi are non- negative. The convex hull is the set of convex combinations. A k-simplex is the P convex hull of k + 1 affinely independent points, σ = conv fu0; u1; : : : ; ukg. We sometimes say the ui span σ. Its dimension is dim σ = k. We use special names of the first few dimensions, vertex for 0-simplex, edge for 1-simplex, triangle for 2-simplex, and tetrahedron for 3-simplex; see Figure III.1.
    [Show full text]
  • Degrees of Freedom in Quadratic Goodness of Fit
    Submitted to the Annals of Statistics DEGREES OF FREEDOM IN QUADRATIC GOODNESS OF FIT By Bruce G. Lindsay∗, Marianthi Markatouy and Surajit Ray Pennsylvania State University, Columbia University, Boston University We study the effect of degrees of freedom on the level and power of quadratic distance based tests. The concept of an eigendepth index is introduced and discussed in the context of selecting the optimal de- grees of freedom, where optimality refers to high power. We introduce the class of diffusion kernels by the properties we seek these kernels to have and give a method for constructing them by exponentiating the rate matrix of a Markov chain. Product kernels and their spectral decomposition are discussed and shown useful for high dimensional data problems. 1. Introduction. Lindsay et al. (2008) developed a general theory for good- ness of fit testing based on quadratic distances. This class of tests is enormous, encompassing many of the tests found in the literature. It includes tests based on characteristic functions, density estimation, and the chi-squared tests, as well as providing quadratic approximations to many other tests, such as those based on likelihood ratios. The flexibility of the methodology is particularly important for enabling statisticians to readily construct tests for model fit in higher dimensions and in more complex data. ∗Supported by NSF grant DMS-04-05637 ySupported by NSF grant DMS-05-04957 AMS 2000 subject classifications: Primary 62F99, 62F03; secondary 62H15, 62F05 Keywords and phrases: Degrees of freedom, eigendepth, high dimensional goodness of fit, Markov diffusion kernels, quadratic distance, spectral decomposition in high dimensions 1 2 LINDSAY ET AL.
    [Show full text]
  • Arxiv:1910.10745V1 [Cond-Mat.Str-El] 23 Oct 2019 2.2 Symmetry-Protected Time Crystals
    A Brief History of Time Crystals Vedika Khemania,b,∗, Roderich Moessnerc, S. L. Sondhid aDepartment of Physics, Harvard University, Cambridge, Massachusetts 02138, USA bDepartment of Physics, Stanford University, Stanford, California 94305, USA cMax-Planck-Institut f¨urPhysik komplexer Systeme, 01187 Dresden, Germany dDepartment of Physics, Princeton University, Princeton, New Jersey 08544, USA Abstract The idea of breaking time-translation symmetry has fascinated humanity at least since ancient proposals of the per- petuum mobile. Unlike the breaking of other symmetries, such as spatial translation in a crystal or spin rotation in a magnet, time translation symmetry breaking (TTSB) has been tantalisingly elusive. We review this history up to recent developments which have shown that discrete TTSB does takes place in periodically driven (Floquet) systems in the presence of many-body localization (MBL). Such Floquet time-crystals represent a new paradigm in quantum statistical mechanics — that of an intrinsically out-of-equilibrium many-body phase of matter with no equilibrium counterpart. We include a compendium of the necessary background on the statistical mechanics of phase structure in many- body systems, before specializing to a detailed discussion of the nature, and diagnostics, of TTSB. In particular, we provide precise definitions that formalize the notion of a time-crystal as a stable, macroscopic, conservative clock — explaining both the need for a many-body system in the infinite volume limit, and for a lack of net energy absorption or dissipation. Our discussion emphasizes that TTSB in a time-crystal is accompanied by the breaking of a spatial symmetry — so that time-crystals exhibit a novel form of spatiotemporal order.
    [Show full text]
  • THE DIMENSION of a VECTOR SPACE 1. Introduction This Handout
    THE DIMENSION OF A VECTOR SPACE KEITH CONRAD 1. Introduction This handout is a supplementary discussion leading up to the definition of dimension of a vector space and some of its properties. We start by defining the span of a finite set of vectors and linear independence of a finite set of vectors, which are combined to define the all-important concept of a basis. Definition 1.1. Let V be a vector space over a field F . For any finite subset fv1; : : : ; vng of V , its span is the set of all of its linear combinations: Span(v1; : : : ; vn) = fc1v1 + ··· + cnvn : ci 2 F g: Example 1.2. In F 3, Span((1; 0; 0); (0; 1; 0)) is the xy-plane in F 3. Example 1.3. If v is a single vector in V then Span(v) = fcv : c 2 F g = F v is the set of scalar multiples of v, which for nonzero v should be thought of geometrically as a line (through the origin, since it includes 0 · v = 0). Since sums of linear combinations are linear combinations and the scalar multiple of a linear combination is a linear combination, Span(v1; : : : ; vn) is a subspace of V . It may not be all of V , of course. Definition 1.4. If fv1; : : : ; vng satisfies Span(fv1; : : : ; vng) = V , that is, if every vector in V is a linear combination from fv1; : : : ; vng, then we say this set spans V or it is a spanning set for V . Example 1.5. In F 2, the set f(1; 0); (0; 1); (1; 1)g is a spanning set of F 2.
    [Show full text]
  • Slices, Slabs, and Sections of the Unit Hypercube
    Slices, Slabs, and Sections of the Unit Hypercube Jean-Luc Marichal Michael J. Mossinghoff Institute of Mathematics Department of Mathematics University of Luxembourg Davidson College 162A, avenue de la Fa¨ıencerie Davidson, NC 28035-6996 L-1511 Luxembourg USA Luxembourg [email protected] [email protected] Submitted: July 27, 2006; Revised: August 6, 2007; Accepted: January 21, 2008; Published: January 29, 2008 Abstract Using combinatorial methods, we derive several formulas for the volume of convex bodies obtained by intersecting a unit hypercube with a halfspace, or with a hyperplane of codimension 1, or with a flat defined by two parallel hyperplanes. We also describe some of the history of these problems, dating to P´olya’s Ph.D. thesis, and we discuss several applications of these formulas. Subject Class: Primary: 52A38, 52B11; Secondary: 05A19, 60D05. Keywords: Cube slicing, hyperplane section, signed decomposition, volume, Eulerian numbers. 1 Introduction In this note we study the volumes of portions of n-dimensional cubes determined by hyper- planes. More precisely, we study slices created by intersecting a hypercube with a halfspace, slabs formed as the portion of a hypercube lying between two parallel hyperplanes, and sections obtained by intersecting a hypercube with a hyperplane. These objects occur natu- rally in several fields, including probability, number theory, geometry, physics, and analysis. In this paper we describe an elementary combinatorial method for calculating volumes of arbitrary slices, slabs, and sections of a unit cube. We also describe some applications that tie these geometric results to problems in analysis and combinatorics. Some of the results we obtain here have in fact appeared earlier in other contexts.
    [Show full text]
  • Near-Death Experiences and the Theory of the Extraneuronal Hyperspace
    Near-Death Experiences and the Theory of the Extraneuronal Hyperspace Linz Audain, J.D., Ph.D., M.D. George Washington University The Mandate Corporation, Washington, DC ABSTRACT: It is possible and desirable to supplement the traditional neu rological and metaphysical explanatory models of the near-death experience (NDE) with yet a third type of explanatory model that links the neurological and the metaphysical. I set forth the rudiments of this model, the Theory of the Extraneuronal Hyperspace, with six propositions. I then use this theory to explain three of the pressing issues within NDE scholarship: the veridicality, precognition and "fear-death experience" phenomena. Many scholars who write about near-death experiences (NDEs) are of the opinion that explanatory models of the NDE can be classified into one of two types (Blackmore, 1993; Moody, 1975). One type of explana tory model is the metaphysical or supernatural one. In that model, the events that occur within the NDE, such as the presence of a tunnel, are real events that occur beyond the confines of time and space. In a sec ond type of explanatory model, the traditional model, the events that occur within the NDE are not at all real. Those events are merely the product of neurobiochemical activity that can be explained within the confines of current neurological and psychological theory, for example, as hallucination. In this article, I supplement this dichotomous view of explanatory models of the NDE by proposing yet a third type of explanatory model: the Theory of the Extraneuronal Hyperspace. This theory represents a Linz Audain, J.D., Ph.D., M.D., is a Resident in Internal Medicine at George Washington University, and Chief Executive Officer of The Mandate Corporation.
    [Show full text]
  • Arxiv:1902.02232V1 [Cond-Mat.Mtrl-Sci] 6 Feb 2019
    Hyperspatial optimisation of structures Chris J. Pickard∗ Department of Materials Science & Metallurgy, University of Cambridge, 27 Charles Babbage Road, Cambridge CB3 0FS, United Kingdom and Advanced Institute for Materials Research, Tohoku University 2-1-1 Katahira, Aoba, Sendai, 980-8577, Japan (Dated: February 7, 2019) Anticipating the low energy arrangements of atoms in space is an indispensable scientific task. Modern stochastic approaches to searching for these configurations depend on the optimisation of structures to nearby local minima in the energy landscape. In many cases these local minima are relatively high in energy, and inspection reveals that they are trapped, tangled, or otherwise frustrated in their descent to a lower energy configuration. Strategies have been developed which attempt to overcome these traps, such as classical and quantum annealing, basin/minima hopping, evolutionary algorithms and swarm based methods. Random structure search makes no attempt to avoid the local minima, and benefits from a broad and uncorrelated sampling of configuration space. It has been particularly successful in the first principles prediction of unexpected new phases of dense matter. Here it is demonstrated that by starting the structural optimisations in a higher dimensional space, or hyperspace, many of the traps can be avoided, and that the probability of reaching low energy configurations is much enhanced. Excursions into the extra dimensions are progressively eliminated through the application of a growing energetic penalty. This approach is tested on hard cases for random search { clusters, compounds, and covalently bonded networks. The improvements observed are most dramatic for the most difficult ones. Random structure search is shown to be typically accelerated by two orders of magnitude, and more for particularly challenging systems.
    [Show full text]
  • Linear Algebra Handout
    Artificial Intelligence: 6.034 Massachusetts Institute of Technology April 20, 2012 Spring 2012 Recitation 10 Linear Algebra Review • A vector is an ordered list of values. It is often denoted using angle brackets: ha; bi, and its variable name is often written in bold (z) or with an arrow (~z). We can refer to an individual element of a vector using its index: for example, the first element of z would be z1 (or z0, depending on how we're indexing). Each element of a vector generally corresponds to a particular dimension or feature, which could be discrete or continuous; often you can think of a vector as a point in Euclidean space. p 2 2 2 • The magnitude (also called norm) of a vector x = hx1; x2; :::; xni is x1 + x2 + ::: + xn, and is denoted jxj or kxk. • The sum of a set of vectors is their elementwise sum: for example, ha; bi + hc; di = ha + c; b + di (so vectors can only be added if they are the same length). The dot product (also called scalar product) of two vectors is the sum of their elementwise products: for example, ha; bi · hc; di = ac + bd. The dot product x · y is also equal to kxkkyk cos θ, where θ is the angle between x and y. • A matrix is a generalization of a vector: instead of having just one row or one column, it can have m rows and n columns. A square matrix is one that has the same number of rows as columns. A matrix's variable name is generally a capital letter, often written in bold.
    [Show full text]