3d drawing in matlab

Embed Size (px)

Citation preview

  • 7/27/2019 3d drawing in matlab

    1/41

    Visualizing Functions of Several

    Variables and Surfaces

    Contents

    Functions of Two Variables

    Finer Points of Plotting with MATLAB

    Problem 1:

    Problem 2:

    Surfaces

    Problem 3:

    Parameterized Surfaces

    Problem 4:

    Additional Problems

    Functions of Two Variables

    A function f of two variables is a rule which produces from two numerical inputs, say

    x and y, a numerical output, written f(x, y). Sometimes it will be preferable to think

    off as taking one (2-dimensional) vector input instead of two scalar inputs. Now

    there are two main ways to visualize such a function:

    a contour plot, or a two-dimensional picture of the level curves of the surface,

    which have equations of the form f(x, y) = c, where c is a constant; the graph of the function, which is the set of points (x, y, z) in three-

    dimensional space satisfying f(x, y) = z.

    We begin by illustrating how to produce these two kinds of pictures in MATLAB,

    using MATLAB's easy-to-use plotting commands, ezcontour and ezsurf. We will

    take f sufficiently complicated to be of some interest. Note that our plotting

    commands can take as input an expression that defines a function, rather than a

    function itself. (In other words, it is not necessary to use an M-file or an anonymous

    function as an input to the plotting command.)

    syms x yf=((x^2-1)+(y^2-4)+(x^2-1)*(y^2-4))/(x^2+y^2+1)^2

    f =

    ((x^2 - 1)*(y^2 - 4) + x^2 + y^2 - 5)/(x^2 + y^2 + 1)^2

    We start with the contour plot. All we need as arguments to ezcontour are the

    expression, whose contours are to be plotted, and the ranges of values forx and y.

    ezcontour(f, [-3, 3, -3, 3])

    http://www-users.math.umd.edu/~jmr/241/surfaces.html#1http://www-users.math.umd.edu/~jmr/241/surfaces.html#5http://www-users.math.umd.edu/~jmr/241/surfaces.html#12http://www-users.math.umd.edu/~jmr/241/surfaces.html#14http://www-users.math.umd.edu/~jmr/241/surfaces.html#15http://www-users.math.umd.edu/~jmr/241/surfaces.html#17http://www-users.math.umd.edu/~jmr/241/surfaces.html#18http://www-users.math.umd.edu/~jmr/241/surfaces.html#22http://www-users.math.umd.edu/~jmr/241/surfaces.html#23http://www-users.math.umd.edu/~jmr/241/surfaces.html#5http://www-users.math.umd.edu/~jmr/241/surfaces.html#12http://www-users.math.umd.edu/~jmr/241/surfaces.html#14http://www-users.math.umd.edu/~jmr/241/surfaces.html#15http://www-users.math.umd.edu/~jmr/241/surfaces.html#17http://www-users.math.umd.edu/~jmr/241/surfaces.html#18http://www-users.math.umd.edu/~jmr/241/surfaces.html#22http://www-users.math.umd.edu/~jmr/241/surfaces.html#23http://www-users.math.umd.edu/~jmr/241/surfaces.html#1
  • 7/27/2019 3d drawing in matlab

    2/41

    The color coding in the contour plot tells us how the values of the constant c are

    varying. One of the pictures in this case is misleading; the contour in dark blue in the

    very middle should really have the form of a figure-eight. We will see later why this

    is so and how to detect it.

    But for the time being let's move on. Now for a picture of the graph off:

    ezsurf(f, [-3, 3, -3, 3])

    Once you execute this command, you can rotate the figure in space to be able to view

    it from different angles. Note that the graph is a surface, in other words, a two-

    dimensional geometric object sitting in three-space. Every graph of a function of two

    variables is a surface, but not conversely. Note that MATLAB again color-codes the

    output, with blue denoting the smallest values of the function, and red denoting the

    largest.

  • 7/27/2019 3d drawing in matlab

    3/41

    Finer Points of Plotting with MATLAB

    We begin with a brief discussion of how MATLAB does its plotting. The arguments

    to a MATLAB [non-ez] plotting function, such as surf,plot,plot3,mesh, or

    contour, are two or three identically shaped arrays. The positions in these arrays

    correspond to parameter or coordinate values; the entries give the coordinates as

    functions of the parameters (which may be identical with the coordinates). Thus for a

    curve, the arguments are usually linear arrays, or vectors, while for a surface, they are

    rectangular arrays, or matrices.

    We will illustrate how this works to plot the graph of the function f above. In this

    case, the parameters are also the x and y coordinates. We start by defining the

    coordinate grid with themeshgridcommand.

    [X1,Y1]= meshgrid(-5:.2:5,-5:.2:5);

    We use X1 and Y1, rather than x and y, because we want to reserve the latter for

    symbolic variables. The command creates a grid with both the x and y coordinates

    varying in steps of .2 from -5 to 5. Note the use of the semicolon! If we had not

    suppressed the output, MATLAB would have printed out the entire grid.

  • 7/27/2019 3d drawing in matlab

    4/41

    Next, we must make f from a symbolic expression into a vectorized function, since it

    must operate on our arrays ofx- and y-values. The output ofvectorize is a string,

    so we use eval to evaluate it as a function. Then we evaluate this function at each

    point of the grid, to define the array ofz-coordinates for the plot.

    zfun = @(x, y) eval(vectorize(f))Z1=zfun(X1,Y1);

    zfun =

    @(x,y)eval(vectorize(f))

    We can now proceed with the plot in any of several ways:

    surf(X1,Y1,Z1)

  • 7/27/2019 3d drawing in matlab

    5/41

    mesh(X1,Y1,Z1)

    plot3(X1,Y1,Z1)

    By now, it may have occurred to you

    that we could have issued exactly the

    same sequence of commands for any

    parametrized surface. The essentialinformation for such a plot is the

    name of the symbolic vector that

    defined the parametrization, the

    specification of the parameter grid,

    and the plotting function to be used.

    We could have also used the ez

    plotting functions, as in:

    ezsurf(f,[-5,5,-5,5])

  • 7/27/2019 3d drawing in matlab

    6/41

    ezmesh(f,[-5,5,-5,5])

    Problem 1:

    Obtain surface mesh and line plots of the function

    (a) By using the step by step procedure followed above.

  • 7/27/2019 3d drawing in matlab

    7/41

    (b) By using ezsurf, ezmesh, and ezplot3.

    Now let's go back to contour plots. ezcontour does not allow us to specify how many

    or which contours we want, or the colors of the contours. However, we can

    accomplish this using contour. For instance, we can plot the level curves f = 0 and

    f = 0.2 in red by typing:

    contour(X1, Y1, Z1, [0,.2], 'r')

    Problem 2:

    (a) Obtain a contour plot of the function g(x,y) defined in Problem 1, using

    MATLAB's default contours.

    (b) Superimpose on the a plot of part (a) a plot showing the contours g(x,y)

    = 0, g(x,y)= 0.2, and g(x,y) = 0.4 in red.

    Surfaces

    Although we will analyze the function f(x,y) further in the next lesson, we abandon

    it for the present. Instead we discuss how to plot a surface that is not the graph of a

    function of two variables, such as a sphere. There are two main techniques available:

    (1) We can write the surface as a level surface f(x, y, z) = c of a function

    ofthree variables, f(x, y, z).

    (2) We can parameterize the surface by writing x, y, and z each as functions of

    two parameters, say s and t. This is analogous to parameterizing a curve and

    writing x, y, and z each as a function oft.

    We begin with the first case. The graph of a function of three variables would require

    a four dimensional plot, which is beyond MATLAB's capabilities, but we can draw a

    picture of a single level surface of the function. This can be viewed as a three

    dimensional version of contour plotting. A plot showing more than one contour is

    usually difficult to interpret, so we will discuss plotting a single contour. For this one

    can use the following M-file implicitplot3d:

    type implicitplot3d.m

    function out=implicitplot3d(varargin)

    %IMPLICITPLOT3D 3-D implicit plot

    % IMPLICITPLOT3D(eq, val, xvar, yvar, zvar, xmin, xmax,

    % ymin, ymax, zmin, zmax) plots an implicit equation

    % eq=val, where eq is either symbolic expression of (symbolic)

    % variables xvar, yvar, and zvar in the indicated ranges, or

    % a string representing such an expression, and val is a number.

    % If xvar, yvar, and zvar are not specified, it is assumed they are

    % x, y, z in the symbolic case, or 'x', 'y',and 'z' in the

    % string form of the command, respectively.

    % The optional parameter plotpoints (added at the end)

    % gives the number of steps in each direction between plottingpoints.

    %

  • 7/27/2019 3d drawing in matlab

    8/41

    % Example: implicitplot3d('x^2+y^2+z^2', 5, -3, 3, -3, 3, -3, 3)

    % plots the sphere 'x^2+y^2+z^2=5' with 'x', 'y', and 'z'

    % going from -3 to 3.

    % implicitplot3d('x^2+y^2+z^2', 5, -3, 3, -3, 3, -3, 3, 30)

    % does the same with higher accuracy.

    % written by Jonathan Rosenberg, 7/30/99

    % rewritten for MATLAB 7, 8/22/05

    if nargin12, error('too many input arguments'); end

    % Default value of plotpoints is 10.

    plotpoints=10;

    eq=varargin{1}; val=varargin{2};

    stringflag=ischar(eq); % This is 'true' in the string case,

    % 'false' in the symbolic case.

    % Next, handle subcase where variable names are missing.

    if nargin10

    xvar=varargin{3}; yvar=varargin{4}; zvar=varargin{5};

    xmin=varargin{6}; xmax=varargin{7};

    ymin=varargin{8}; ymax=varargin{9};

    zmin=varargin{10}; zmax=varargin{11};

    if nargin==12, plotpoints=varargin{12}; end

    end

    if stringflag

    F = vectorize(inline(eq,xvar,yvar,zvar));

    else

    F = inline(vectorize(eq),char(xvar),char(yvar),char(zvar));

    end

    [X Y]= meshgrid(xmin:(xmax-xmin)/plotpoints:xmax, ymin:(ymax-

    ymin)/plotpoints:ymax);

    %% Go through zvalues one at a time. For each one, plot corresponding

    %% contourplot in x and y, with that z-value. We could use "contour"

    %% except that it makes a "shadow", so we copy some of

    %% the code of "contour".

  • 7/27/2019 3d drawing in matlab

    9/41

    for z=zmin:(zmax-zmin)/plotpoints:zmax

    lims = [min(X(:)),max(X(:)), min(Y(:)),max(Y(:))];

    c = contours(X,Y,F(X,Y,z), [val val]);

    limit = size(c,2);

    i = 1;

    h = [];

    while(i < limit)npoints = c(2,i);

    nexti = i+npoints+1;

    xdata = c(1,i+1:i+npoints);

    ydata = c(2,i+1:i+npoints);

    zdata = z + 0*xdata; % Make zdata the same size as xdata

    line('XData',xdata,'YData',ydata,'ZData',zdata); hold on;

    i = nexti;

    end

    end

    view(3)

    xlabel(char(xvar))

    ylabel(char(yvar))

    zlabel(char(zvar))title([char(eq),' = ',num2str(val)], 'Interpreter','none')

    hold off

    Here's an example:

    syms x y z; h=x^2+y^2+z^2; clf; % Clear old figure

    implicitplot3d(h, 4, -3, 3, -3, 3, -3, 3, 40); axis equal

    Problem 3:

    Plot the hyperboloid

    (Think of it as a level surface.)

    Parameterized SurfacesWe have now plotted surfaces as graphs of functions of two variables or as level

    surfaces of functions of three variables. The third possibility is case (2) above, using a

    parameterization, which we have already used in a previous lesson. Let us return to

    the tube around the twisted cubic. We will not need the entire context that created it,

    but only the parametrization of the tube itself.

    syms s t

    tctube=[ t- 1/5*cos(s)*t*(2+9*t^2)/(9*t^4+9*t^2+1)^(1/2)/

    (1+4*t^2+9*t^4)^(1/2)+3/5*sin(s)*t^2/(9*t^4+9*t^2+1)^(1/2), ...

    t^2-1/5*cos(s)*(-1+9*t^4)/(9*t^4+9*t^2+1)^(1/2)/

    (1+4*t^2+9*t^4)^(1/2)-3/5*sin(s)*t/(9*t^4+9*t^2+1)^(1/2), ...

  • 7/27/2019 3d drawing in matlab

    10/41

    t^3+3/5*cos(s)*t*(1+2*t^2)/(9*t^4+9*t^2+1)^(1/2)/

    (1+4*t^2+9*t^4)^(1/2)+1/5*sin(s)/(9*t^4+9*t^2+1)^(1/2)]

    tctube =

    [ t + (3*t^2*sin(s))/(5*(9*t^4 + 9*t^2 + 1)^(1/2)) - (t*cos(s)*(9*t^2

    + 2))/(5*(9*t^4 + 4*t^2 + 1)^(1/2)*(9*t^4 + 9*t^2 + 1)^(1/2)), t^2 -(3*t*sin(s))/(5*(9*t^4 + 9*t^2 + 1)^(1/2)) - (cos(s)*(9*t^4 - 1))/

    (5*(9*t^4 + 4*t^2 + 1)^(1/2)*(9*t^4 + 9*t^2 + 1)^(1/2)), sin(s)/

    (5*(9*t^4 + 9*t^2 + 1)^(1/2)) + t^3 + (3*t*cos(s)*(2*t^2 + 1))/

    (5*(9*t^4 + 4*t^2 + 1)^(1/2)*(9*t^4 + 9*t^2 + 1)^(1/2))]

    Do not be daunted by the complexity of this expression; we can use ezmesh to

    recreate the plot of the tube that shows the twisting of the curves of constant s.

    ezmesh(tctube(1), tctube(2), tctube(3), [0, 2*pi, -1, 1])

    title 'tube around a twisted cubic'

    Other surfaces can also be parametrized. In particular, the sphere we plotted as a level

    surface can also be plotted parametrically (with better results), using spherical

    coordinates. We use ph and th to represent the angles phi and theta. Note the use of

    axis equal to make sure our plot looks like a sphere and not just an ellipsoid.

    syms ph th

    ezmesh(2*sin(ph)*cos(th), 2*sin(ph)*sin(th), ...

    2*cos(ph), [0, pi, 0, 2*pi])

    axis equal

    Essentially the same parametrization can be used for an ellipsoid by replacing the

    numerical coefficients of the three components, which were all equal to 2 in the above

    case of the sphere, by the lengths of the respective semi-major axes. Hyperboloids can

    be conveniently parametrized using hyperbolic functions. The essential identity to

    bear in mind is

    The following line parametrizes and plots the hyperboloid of one sheet

    ezmesh(cosh(s)*cos(t),cosh(s)*sin(t),sinh(s), [-1, 1, 0, 2*pi])

    Problem 4:

    Parametrize and replot parametrically the hyperboloid you plotted in Problem 3.

  • 7/27/2019 3d drawing in matlab

    11/41

    Additional Problems

    1. Plot the hyperboloid of two sheets

    (a) As a level surface.

    (b) By parametrizing the upper and lower sheets separately and plotting them

    both in the same figure using hold on.

    2. Let

    (a) Plot the graph ofh(x, y) for a range ofx and y sufficient to show the

    interesting features of the function.

    (b) Obtain a contour plot ofh(x, y) for the same range.

  • 7/27/2019 3d drawing in matlab

    12/41

    A 3D scatter plot allows for the visualization of multivariate data of up to four

    dimensions. The Scatter plot takes multiple scalar variables and uses them for

    different axes in phase space. The different variables are combined to form

    coordinates in the phase space and they are displayed using glyphs and colored using

    another scalar variable.[1]

    A scatter plot orscattergraph is a type ofmathematical diagram usingCartesian

    coordinatesto display values for two variablesfor a set of data.

    The data is displayed as a collection of points, each having the value of one variable

    determining the position on the horizontal axis and the value of the other variable

    determining the position on the vertical axis.[2] This kind ofplot is also called a

    scatter chart,scattergram,scatter diagram orscatter graph.

    [edit] Overview

    A scatter plot is used when a variable exists that is under the control of the

    experimenter. If a parameter exists that is systematically incremented and/or

    decremented by the other, it is called the control parameterorindependent variable

    and is customarily plotted along the horizontal axis. The measured ordependent

    variable is customarily plotted along the vertical axis. If no dependent variable exists,

    either type of variable can be plotted on either axis and a scatter plot will illustrate

    only the degree ofcorrelation (not causation) between two variables.

    A scatter plot can suggest various kinds of correlations between variables with a

    certain confidence interval. Correlations may be positive (rising), negative (falling),

    or null (uncorrelated). If the pattern of dots slopes from lower left to upper right, itsuggests a positive correlation between the variables being studied. If the pattern of

    http://en.wikipedia.org/wiki/Scatter_plot#cite_note-0http://en.wikipedia.org/wiki/Scatter_plot#cite_note-0http://en.wikipedia.org/wiki/Mathematical_diagramhttp://en.wikipedia.org/wiki/Mathematical_diagramhttp://en.wikipedia.org/wiki/Cartesian_coordinate_systemhttp://en.wikipedia.org/wiki/Cartesian_coordinate_systemhttp://en.wikipedia.org/wiki/Cartesian_coordinate_systemhttp://en.wikipedia.org/wiki/Cartesian_coordinate_systemhttp://en.wikipedia.org/wiki/Variable_(mathematics)http://en.wikipedia.org/wiki/Variable_(mathematics)http://en.wikipedia.org/wiki/Scatter_plot#cite_note-1http://en.wikipedia.org/wiki/Plot_(graphics)http://en.wikipedia.org/w/index.php?title=Scatter_plot&action=edit&section=1http://en.wikipedia.org/wiki/Independent_variablehttp://en.wikipedia.org/wiki/Dependent_variablehttp://en.wikipedia.org/wiki/Dependent_variablehttp://en.wikipedia.org/wiki/Correlationhttp://en.wikipedia.org/wiki/Causalityhttp://en.wikipedia.org/wiki/Confidence_intervalhttp://en.wikipedia.org/wiki/Correlationhttp://en.wikipedia.org/wiki/File:Scatter_plot.jpghttp://en.wikipedia.org/wiki/File:Scatter_plot.jpghttp://en.wikipedia.org/wiki/File:Oldfaithful3.pnghttp://en.wikipedia.org/wiki/Scatter_plot#cite_note-0http://en.wikipedia.org/wiki/Mathematical_diagramhttp://en.wikipedia.org/wiki/Cartesian_coordinate_systemhttp://en.wikipedia.org/wiki/Cartesian_coordinate_systemhttp://en.wikipedia.org/wiki/Variable_(mathematics)http://en.wikipedia.org/wiki/Scatter_plot#cite_note-1http://en.wikipedia.org/wiki/Plot_(graphics)http://en.wikipedia.org/w/index.php?title=Scatter_plot&action=edit&section=1http://en.wikipedia.org/wiki/Independent_variablehttp://en.wikipedia.org/wiki/Dependent_variablehttp://en.wikipedia.org/wiki/Dependent_variablehttp://en.wikipedia.org/wiki/Correlationhttp://en.wikipedia.org/wiki/Causalityhttp://en.wikipedia.org/wiki/Confidence_intervalhttp://en.wikipedia.org/wiki/Correlation
  • 7/27/2019 3d drawing in matlab

    13/41

    dots slopes from upper left to lower right, it suggests a negative correlation. A line of

    best fit (alternatively called 'trendline') can be drawn in order to study the correlation

    between the variables. An equation for the correlation between the variables can be

    determined by established best-fit procedures. For a linear correlation, the best-fit

    procedure is known as linear regressionand is guaranteed to generate a correct

    solution in a finite time. No universal best-fit procedure is guaranteed to generatea correct solution for arbitrary relationships. A scatter plot is also very useful

    when we wish to see how two comparable data sets agree with each other. In this

    case, an identity line, i.e., ay=xline, or an 1:1 line, is often drawn as a reference.

    The more the two data sets agree, the more the scatters tend to concentrate in the

    vicinity of the identity line; if the two data sets are numerically identical, the

    scatters fall on the identity line exactly.

    One of the most powerful aspects of a scatter plot, however, is its ability to show

    nonlinear relationships between variables. Furthermore, if the data is represented by a

    mixture model of simple relationships, these relationships will be visually evident as

    superimposed patterns.

    The scatter diagram is one of the seven basic tools ofquality control.[3]

    [edit] Example

    For example, to display values for "lung capacity" (first variable) and how long that

    person could hold his breath, a researcher would choose a group of people to study,

    then measure each one's lung capacity (first variable) and how long that person could

    hold his breath (second variable). The researcher would then plot the data in a scatter

    plot, assigning "lung capacity" to the horizontal axis, and "time holding breath" to thevertical axis.

    A person with a lung capacity of 400 ml who held his breath for 21.7 seconds would

    be represented by a single dot on the scatter plot at the point (400, 21.7) in the

    Cartesian coordinates. The scatter plot of all the people in the study would enable the

    researcher to obtain a visual comparison of the two variables in the data set, and will

    help to determine what kind of relationship there might be between the two variables.

    [edit] See also

    Plot (graphics)

    [edit] References

    1. ^ Visualizations that have been created with VisIt. at wci.llnl.gov. Last

    updated: November 8, 2007.

    2. ^ Utts, Jessica M. Seeing Through Statistics 3rd Edition, Thomson

    Brooks/Cole, 2005, pp 166-167. ISBN 0-534-39402-7

    3. ^Nancy R. Tague (2004). "Seven Basic Quality Tools". The Quality

    Toolbox.Milwaukee, Wisconsin: American Society for Quality. p. 15.

    http://en.wikipedia.org/wiki/Curve_fittinghttp://en.wikipedia.org/wiki/Linear_regressionhttp://en.wikipedia.org/wiki/Linear_regressionhttp://en.wikipedia.org/wiki/Identity_linehttp://en.wikipedia.org/wiki/Seven_Basic_Tools_of_Qualityhttp://en.wikipedia.org/wiki/Quality_controlhttp://en.wikipedia.org/wiki/Quality_controlhttp://en.wikipedia.org/wiki/Scatter_plot#cite_note-2http://en.wikipedia.org/w/index.php?title=Scatter_plot&action=edit&section=2http://en.wikipedia.org/wiki/Cartesian_coordinate_systemhttp://en.wikipedia.org/w/index.php?title=Scatter_plot&action=edit&section=3http://en.wikipedia.org/wiki/Plot_(graphics)http://en.wikipedia.org/w/index.php?title=Scatter_plot&action=edit&section=4http://en.wikipedia.org/wiki/Scatter_plot#cite_ref-0https://wci.llnl.gov/codes/visit/gallery.htmlhttp://en.wikipedia.org/wiki/Scatter_plot#cite_ref-1http://en.wikipedia.org/wiki/Special:BookSources/0534394027http://en.wikipedia.org/wiki/Scatter_plot#cite_ref-2http://www.asq.org/learn-about-quality/seven-basic-quality-tools/overview/overview.htmlhttp://en.wikipedia.org/wiki/Milwaukee,_Wisconsinhttp://en.wikipedia.org/wiki/Milwaukee,_Wisconsinhttp://en.wikipedia.org/wiki/American_Society_for_Qualityhttp://en.wikipedia.org/wiki/Curve_fittinghttp://en.wikipedia.org/wiki/Linear_regressionhttp://en.wikipedia.org/wiki/Identity_linehttp://en.wikipedia.org/wiki/Seven_Basic_Tools_of_Qualityhttp://en.wikipedia.org/wiki/Quality_controlhttp://en.wikipedia.org/wiki/Scatter_plot#cite_note-2http://en.wikipedia.org/w/index.php?title=Scatter_plot&action=edit&section=2http://en.wikipedia.org/wiki/Cartesian_coordinate_systemhttp://en.wikipedia.org/w/index.php?title=Scatter_plot&action=edit&section=3http://en.wikipedia.org/wiki/Plot_(graphics)http://en.wikipedia.org/w/index.php?title=Scatter_plot&action=edit&section=4http://en.wikipedia.org/wiki/Scatter_plot#cite_ref-0https://wci.llnl.gov/codes/visit/gallery.htmlhttp://en.wikipedia.org/wiki/Scatter_plot#cite_ref-1http://en.wikipedia.org/wiki/Special:BookSources/0534394027http://en.wikipedia.org/wiki/Scatter_plot#cite_ref-2http://www.asq.org/learn-about-quality/seven-basic-quality-tools/overview/overview.htmlhttp://en.wikipedia.org/wiki/Milwaukee,_Wisconsinhttp://en.wikipedia.org/wiki/American_Society_for_Quality
  • 7/27/2019 3d drawing in matlab

    14/41

    http://www.asq.org/learn-about-quality/seven-basic-quality-

    tools/overview/overview.html. Retrieved 2010-02-05.

    [edit] External links

    Wikimedia Commons has media related to:Scatterplots

    What is a scatterplot?

    Correlation scatter-plot matrix - for ordered-categorical data - Explanation and

    R code

    Retrieved from "http://en.wikipedia.org/wiki/Scatter_plot"

    Categories: Statistical charts and diagrams |Quality control tools

    Hidden categories: Statistics articles with navigational template

    Learning Objectives

    After completing this tutorial, you should be able to:

    1. Plot points on a rectangular coordinate system.

    2. Identify what quadrant or axis a point lies on.

    3. Know if an equation is a linear equation.

    4. Tell if an ordered pair is a solution of an equation in two variables or not.

    http://www.asq.org/learn-about-quality/seven-basic-quality-tools/overview/overview.htmlhttp://www.asq.org/learn-about-quality/seven-basic-quality-tools/overview/overview.htmlhttp://www.asq.org/learn-about-quality/seven-basic-quality-tools/overview/overview.htmlhttp://en.wikipedia.org/w/index.php?title=Scatter_plot&action=edit&section=5http://commons.wikimedia.org/wiki/Category:Scatterplotshttp://www.psychwiki.com/wiki/What_is_a_scatterplot%3Fhttp://www.r-statistics.com/2010/04/correlation-scatter-plot-matrix-for-ordered-categorical-data/http://en.wikipedia.org/wiki/Scatter_plothttp://en.wikipedia.org/wiki/Special:Categorieshttp://en.wikipedia.org/wiki/Category:Statistical_charts_and_diagramshttp://en.wikipedia.org/wiki/Category:Quality_control_toolshttp://en.wikipedia.org/wiki/Category:Quality_control_toolshttp://en.wikipedia.org/wiki/Category:Statistics_articles_with_navigational_templatehttp://www.asq.org/learn-about-quality/seven-basic-quality-tools/overview/overview.htmlhttp://www.asq.org/learn-about-quality/seven-basic-quality-tools/overview/overview.htmlhttp://en.wikipedia.org/w/index.php?title=Scatter_plot&action=edit&section=5http://commons.wikimedia.org/wiki/Category:Scatterplotshttp://www.psychwiki.com/wiki/What_is_a_scatterplot%3Fhttp://www.r-statistics.com/2010/04/correlation-scatter-plot-matrix-for-ordered-categorical-data/http://en.wikipedia.org/wiki/Scatter_plothttp://en.wikipedia.org/wiki/Special:Categorieshttp://en.wikipedia.org/wiki/Category:Statistical_charts_and_diagramshttp://en.wikipedia.org/wiki/Category:Quality_control_toolshttp://en.wikipedia.org/wiki/Category:Statistics_articles_with_navigational_template
  • 7/27/2019 3d drawing in matlab

    15/41

    5. Graph an equation by plotting points.

    Introduction

    This section covers the basic ideas of graphing: rectangular coordinate system, solutions to equations

    in two variables, and sketching a graph. Graphs are important in giving a visual representation of the

    correlation between two variables. Even though in this section we are going to look at it generically, using

    a generalx andy variable, you can use two-dimensional graphs for any application where you have twovariables. For example, you may have a cost function that is dependent on the quantity of items made. If

    you needed to show your boss visually the correlation of the quantity with the cost, you could do that on a

    two-dimensional graph. I believe that it is important for you learn how to do something in general, then

    when you need to apply it to something specific you have the knowledge to do so. Going from general tospecific is a lot easier than specific to general. And that is what we are doing here looking at graphing in

    general so later you can apply it to something specific, if needed.

    Tutorial

    Rectangular Coordinate System

    The following is the rectangular coordinate system:

  • 7/27/2019 3d drawing in matlab

    16/41

    It is made up of two number lines:

    1. The horizontal number line is thex- axis.

    2. The vertical number line is they- axis.

    The origin is where the two intersect. This is where both number lines are 0.

    It is split into fourquadrants which are marked on this graph with Roman numerals.

    Each point on the graph is associated with an ordered pair. When dealing with anx, y graph,

    x is always first andy is always second in the ordered pair(x, y). It is a solution to an equationin two variables. Even though there are two values in the ordered pair, be careful that it

    associates to ONLY ONE point on the graph, the point lines up with both the xvalue of the

    ordered pair (x-axis) and they value of the ordered pair (y-axis).

    Example 1: Plot the ordered pairs and name the quadrant or axis in which the point lies.A(2, 3), B(-1, 2), C(-3, -4), D(2, 0), and E(0, 5).

    Remember that each ordered pair associates with only one point on the graph. Just line up the

    x value and then they value to get your location.

    A(2, 3) lies in quadrant I.

    B(-1, 2) lies in quadrant II.

    C(-3, -4) lies in quadrant III.

  • 7/27/2019 3d drawing in matlab

    17/41

    D(2, 0) lies on thex-axis.

    E(0, 5) lies on they-axis.

    Solutions of Equations

    in Two Variables

    The solutions to equations in two variables consist of two values that when substituted into their

    corresponding variables in the equation, make a true statement.

    In other words, if your equation has two variablesx andy, and you plug in a value forx and itscorresponding value fory and the mathematical statement comes out to be true, then thex andy value thatyou plugged in would together be a solution to the equation.

    Equations in two variables can have more than one solution.

    We usually write the solutions to equations in two variables in ordered pairs.

    Example 2: Determine whether each ordered pair is a solution of the given equation. y =

    5x - 7; (2, 3), (1, 5), (-1, -12)

    Lets start with the ordered pair (2, 3).

    Which number is thex value and which one is they value? If you saidx = 2 andy = 3, you arecorrect!

    Lets plug (2, 3) into the equation and see what we get:

    *Plug in 2 forxand 3 for y

    This is a TRUE statement, so (2, 3) is a solution to the equationy = 5x- 7.

  • 7/27/2019 3d drawing in matlab

    18/41

    Now lets take a look at (1, 5).

    Which number is thex value and which one is they value? If you saidx = 1 and y = 5, youare right!

    Lets plug (1, 5) into the equation and see what we get:

    *Plug in 1 forxand 5 for y

    Whoops, it looks like we have ourselves a FALSE statement. This means that (1, 5) is NOT

    a solution to the equation 5x- 7.

    Now lets look at (-1, -12).

    Which number is thex value and which one is they value? If you saidx = -1 andy = -12,you are right!

    Lets plug (-1, -12) into the equation and see what we get:

    *Plug in -1 forxand -12 fory

    We have anotherTRUE statement. This means (-1, -12) is another solution to the equation

    y = 5x- 7.

    Note that you were only given three ordered pairs to check, however, there are an infinite

    number of solutions to this equation. It would very cumbersome to find them all.

  • 7/27/2019 3d drawing in matlab

    19/41

    Example 3: Determine whether each ordered pair is a solution of the given

    equation. ; (0, -3), (1, -3), (-1, -3)

    Lets start with the ordered pair (0, -3).

    Which number is thex value and which one is they value? If you saidx = 0 andy = -3, youare correct!

    Lets plug (0, -3) into the equation and see what we get:

    *Plug in 0 forxand -3 fory

    This is a FALSE statement, so (0, -3) is NOT a solution to the equation

    Now, lets take a look at (1, -3).

    Which number is thex value and which one is they value? If you saidx = 1 and y = -3, youare right!

    Lets plug (1, -3) into the equation and see what we get:

    *Plug in 1 forxand -3 fory

    This is a TRUE statement. This means that (1, -3) is a solution to the equation .

  • 7/27/2019 3d drawing in matlab

    20/41

    Now, lets look at (-1, -3).

    Which number is thex value and which one is they value? If you saidx = -1 andy = -3, youare right!

    Lets plug (-1, -3) into the equation and see what we get:

    *Plug in -1 forxand -3 fory

    This is a TRUE statement. This means that (1, -3) is a solution to the equation .

    Linear Equation in

    Two Variables

    Standard Form:

    Ax+ By = C

    A linear equation in two variables is an equation that can be written in the form Ax + By = C, where A andB are not both 0.

    This form is called the standard form of a linear equation.

    Example 4: Write the following linear equation in standard form.

    y = 7x - 5

    This means we want to write it in the form Ax + By = C.

  • 7/27/2019 3d drawing in matlab

    21/41

    *Inverse of add 7xis sub. 7x*In standard form

    Graphing a Linear Equation

    by Plotting Points

    If the equation is linear:

    Step 1: Find three ordered pair solutions.

    You do this by plugging in ANY three values forx and find their correspondingy values.

    Yes, it can be ANY three values you want, 1, -3, or even 10,000. Remember

    there are an infinite number of solutions. As long as you find the corresponding

    y value that goes with eachx, you have a solution.

    Step 2: Plot the points found in step 1.

    Remember that each ordered pair corresponds to only one point on the graph.

    The point lines up with both the x value of the ordered pair (x-axis) and theyvalue of the ordered pair (y-axis).

    Step 3: Draw the graph.

    A linear equation will graph as a straight line.

    If you know it is a linear equation and your points dont line up, then you either

    need to check your math in step 1 and/or that you plotted all the points found

    correctly.

  • 7/27/2019 3d drawing in matlab

    22/41

    Example 5: Determine whether the equation is linear or not. Then graph the equation. y =

    5x - 3

    If we subtract 5x from both sides, then we can write the given equation as -5x +y = -3.

    Since we can write it in the standard form, Ax+ By = C, then we have a linear equation.

    This means that we will have a line when we go to graph this.

    Step 1: Find three ordered pair solutions.

    Im going to use a chart to organize my information. A chart keeps track of thex values that

    you are using and the correspondingy value found when you used a particularx value.

    If you do this step the same each time, then it will make it easier for you to remember how to

    do it.

    I usually pick out three points when I know Im dealing with a line. The threex values Imgoing to use are -1, 0, and 1. (Note that you can pick ANY three x values that you want.

    You do not have to use the values that I picked.) You want to keep it as simple as possible.

    The following is the chart I ended up with after plugging in the values I mentioned forx.

    x y = 5x- 3 (x,y)

    -1 y = 5(-1) - 3 = -8 (-1, -8)0 y = 5(0) - 3 = -3 (0, -3)

    1 y = 5(1) - 3 = 2 (1, 2)

    Step 2: Plot the points found in step 1.

    http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#linear1http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#linear2http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#linear1http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#linear2
  • 7/27/2019 3d drawing in matlab

    23/41

    Step 3: Draw the graph.

    Graphing a Non-Linear Equation

    by Plotting Points

    If the equation is non-linear:

    Step 1: Find six or seven ordered pair solutions.

    http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#linear3http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#linear3
  • 7/27/2019 3d drawing in matlab

    24/41

    Non-linear equations can vary on what the graph looks like. So it is good to

    have a lot of points so you can get the right shape of the graph.

    Step 2: Plot the points found in step 1.

    Step 3: Draw the graph.

    If the points line up draw a straight line through them. If the points are in a

    curve, draw a curve through them.

    Example 6: Determine whether the equation is linear or not. Then graph the

    equation.

    If we subtract the x squared from both sides, we would end up with . Is this a

    linear equation? Note how we have anx squared as opposed to x to the one power.

    It looks like we cannot write it in the form Ax + By = C because thex has to be to the onepower, not squared. So this is not a linear equation.

    However, we can still graph it.

    Step 1: Find six or seven ordered pair solutions.

    The sevenx values that I'm going to use are -3, -2, -1, 0, 1, 2, and 3. (Note that you can pick

    ANYxvalues that you want. You do not have to use the values that I picked.) You wantto keep it as simple as possible. The following is the chart I ended up with after plugging in the

    values I mentioned forx.

    Note that the carrot top (^) represents an exponent. For example,x squared can be written as

    x^2. The second column is showing you the 'scratch work' of how we got the corresponding

    value ofy.

    http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear1http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear1
  • 7/27/2019 3d drawing in matlab

    25/41

    x (x,y)

    -3 y = (-3)^2 - 4 = 5 (-3, 5)

    -2 y = (-2)^2 - 4 = 0 (-2, 0)

    -1 y = (-1)^2 - 4 = -3 (-1, -3)

    0 y = (0)^2 - 4 = -4 (0, -4)

    1 y = (1)^2 - 4 = -3 (1, -3)

    2 y = (2)^2 - 4 = 0 (2, 0)

    3 y = (3)^2 - 4 = 5 (3, 5)

    Step 2: Plot the points found in step 1.

    Step 3: Draw the graph.

    http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear2http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear3http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear2http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear3
  • 7/27/2019 3d drawing in matlab

    26/41

    Example 7: Determine whether the equation is linear or not. Then graph the

    equation.

    Do you think this equation is linear or not? It is a tricky problem because both thex and y

    variables are to the one power. However,xis inside the absolute value sign and we cantjust take it out of there.

    In other words, we cant write it in the form Ax + By = C. This means that this equation isnot a linear equation.

    If you are unsure that an equation is linear or not, you can ALWAYS plug inx values and find

    the correspondingy values to come up with ordered pairs to plot.

    Step 1: Find six or seven ordered pair solutions.

    The seven x values that I'm going to use are -3, -2, -1, 0, 1, 2, and 3. (Note that you can pick

    ANYxvalues that you want. You do not have to use the values that I picked.) You wantto keep it as simple as possible. The following is the chart I ended up with after plugging in the

    values I mentioned forx.

    x (x,y)-3 y = |-3 + 1| = 2 (-3, 2)

    http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear1http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear1
  • 7/27/2019 3d drawing in matlab

    27/41

    -2 y = |-2 + 1| = 1 (-2, 1)

    -1 y = |-1 + 1| = 0 (-1, 0)

    0 y = |0 + 1| = 1 (0, 1)

    1 y = |1 + 1| = 2 (1, 2)

    2 y = |2 + 1| = 3 (2, 3)

    3 y = |3 + 1| = 4 (3, 4)

    Step 2: Plot the points found in step 1.

    Step 3: Draw the graph.

    http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear2http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear3http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear2http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#nonlinear3
  • 7/27/2019 3d drawing in matlab

    28/41

    Practice Problems

    These are practice problems to help bring you to the next level. It will allow you to check and see if youhave an understanding of these types of problems. Math works just like anything else, if you want to get

    good at it, then you need to practice it. Even the best athletes and musicians had help along the way

    and lots of practice, practice, practice, to get good at their sport or instrument. In fact there is no such

    thing as too much practice.

    To get the most out of these, you should work the problem out on your own and then check your

    answer by clicking on the link for the answer/discussion for that problem. At the link you will find

    the answer as well as any steps that went into finding that answer.

    Practice Problem 1a: Plot the ordered pairs and name the quadrant or axis in which th

    point lies.

    1a. A(3, 1), B(-2, -1/2), C(2, -2), and

    D(0,1)(answer/discussion to 1a)

    Practice Problem 2a: Determine if each ordered pair is a solution of the given equation.

    2a. y = 4x - 10 (0, -10), (1, -14), (-1, -14)

    (answer/discussion to 2a)

    Practice Problems 3a - 3c: Determine whether each equation is linear or not. Then gra

    the equation.

    3a. y = 2x - 1 3b.

    http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph_ans.htm#ad1ahttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph_ans.htm#ad2ahttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph_ans.htm#ad1ahttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph_ans.htm#ad2a
  • 7/27/2019 3d drawing in matlab

    29/41

    (answer/discussion to 3a) (answer/discussion to 3b)

    3c.(answer/discussion to 3c)

    Need Extra Help on these Topics?

    The following are webpages that can assist you in the topics that were covered on this page:

    http://www.purplemath.com/modules/plane.htm

    This webpage helps you with plotting points.

    http://www.math.com/school/subject2/lessons/S2U4L1DP.html

    This website helps you with plotting points.

    http://www.purplemath.com/modules/graphlin.htm

    This webpage helps you with graphing linear equations.

    Go to Get Help Outside the Classroom found in Tutorial 1: How to Succeed in a Math Class for some

    more suggestions.

    WTAMU>Virtual Math Lab > Intermediate Algebra

    Last revised on July 3, 2011 by Kim Seward.

    All contents copyright (C) 2001 - 2011, WTAMU and Kim Seward. All rights reserved.

    bility | Accreditation|Compact with Texans | Contact Us |Form Policy |House Bill 2504 |Legislative Appropriation Re

    cy and Privacy Statement| Online Institutional Resumes | Open Records/Public Information Act |Risk, Fraud and Misc

    Hotline

    Site Map| State of Texas| Statewide Search | Texas Homeland Security | University Organizational Chart

    West Texas A&M University | All Rights Reserved | Canyon, TX 79016 | 806-651-0000

    http://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph_ans.htm#ad3ahttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph_ans.htm#ad3bhttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph_ans.htm#ad3chttp://www.purplemath.com/modules/plane.htmhttp://www.math.com/school/subject2/lessons/S2U4L1DP.htmlhttp://www.math.com/school/subject2/lessons/S2U4L1DP.htmlhttp://www.purplemath.com/modules/graphlin.htmhttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut1_study.htmhttp://www.wtamu.edu/http://www.wtamu.edu/mathlabhttp://www.wtamu.edu/mathlabhttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/index.htmhttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/index.htmhttp://www.wtamu.edu/about/web-accessibility.aspxhttp://www.wtamu.edu/home/accreditation.aspxhttp://www.wtamu.edu/home/accreditation.aspxhttp://www.wtamu.edu/about/compact-with-texans.aspxhttp://www.wtamu.edu/about/compact-with-texans.aspxhttp://www.wtamu.edu/about/contact-us.aspxhttp://www.wtamu.edu/home/link-policy-and-privacy-statement.aspx#formshttp://www.wtamu.edu/home/link-policy-and-privacy-statement.aspx#formshttp://www.wtamu.edu/about/house-bill-2504-requirements.aspxhttp://www.wtamu.edu/about/house-bill-2504-requirements.aspxhttp://www.tamus.edu/offices/budget-acct/lar/fy1213/http://www.tamus.edu/offices/budget-acct/lar/fy1213/http://www.wtamu.edu/home/link-policy-and-privacy-statement.aspxhttp://www.wtamu.edu/home/link-policy-and-privacy-statement.aspxhttp://www.txhighereddata.org/approot/resumes/ir_launch.htmhttp://www.wtamu.edu/about/open-records.aspxhttps://secure.ethicspoint.com/domain/en/report_custom.asp?clientid=19681https://secure.ethicspoint.com/domain/en/report_custom.asp?clientid=19681https://secure.ethicspoint.com/domain/en/report_custom.asp?clientid=19681http://www.wtamu.edu/home/site-map.aspxhttp://www.wtamu.edu/home/site-map.aspxhttp://www.state.tx.us/http://www.state.tx.us/http://www2.tsl.state.tx.us/trail/http://www.texashomelandsecurity.com/http://wtamu.edu/webres/File/Administrative/university_org_chart.pdfhttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph.htm#tophttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph_ans.htm#ad3ahttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph_ans.htm#ad3bhttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut12_graph_ans.htm#ad3chttp://www.purplemath.com/modules/plane.htmhttp://www.math.com/school/subject2/lessons/S2U4L1DP.htmlhttp://www.purplemath.com/modules/graphlin.htmhttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/int_alg_tut1_study.htmhttp://www.wtamu.edu/http://www.wtamu.edu/mathlabhttp://www.wtamu.edu/academic/anns/mps/math/mathlab/int_algebra/index.htmhttp://www.wtamu.edu/about/web-accessibility.aspxhttp://www.wtamu.edu/home/accreditation.aspxhttp://www.wtamu.edu/about/compact-with-texans.aspxhttp://www.wtamu.edu/about/contact-us.aspxhttp://www.wtamu.edu/home/link-policy-and-privacy-statement.aspx#formshttp://www.wtamu.edu/about/house-bill-2504-requirements.aspxhttp://www.tamus.edu/offices/budget-acct/lar/fy1213/http://www.wtamu.edu/home/link-policy-and-privacy-statement.aspxhttp://www.txhighereddata.org/approot/resumes/ir_launch.htmhttp://www.wtamu.edu/about/open-records.aspxhttps://secure.ethicspoint.com/domain/en/report_custom.asp?clientid=19681https://secure.ethicspoint.com/domain/en/report_custom.asp?clientid=19681http://www.wtamu.edu/home/site-map.aspxhttp://www.state.tx.us/http://www2.tsl.state.tx.us/trail/http://www.texashomelandsecurity.com/http://wtamu.edu/webres/File/Administrative/university_org_chart.pdf
  • 7/27/2019 3d drawing in matlab

    30/41

    Solutions: Systems of 3 variable

    Equations

    Where Planes Intersect

    Systems of equations that have three variables are systems of planes. Since all three

    variables equations such as 2x + 3y + 4z = 6 describe a a three dimensional plane.

    Pictured below is an example of the graph of the plane 2x + 3y + z = 6. The

    red triangle is the portion of the plane when x, y, and z values are all positive.

    This plane actually continues off in the negative direction. All that is pictured

    is the part of the plane that is intersected by the positive axes (the negative

    axes have dashed lines).

    Systems of Linear Equations ( 2 variables)

    Like systems of linear equations, the solution of a system of planes can be nosolution, one solution or infinite solutions.

    No Solution of three variable systems

    Below is a picture of three planes that have no solution.There is no single

    point at which all threeplanes intersect, therefore this system has no solution.

    http://www.mathwarehouse.com/algebra/linear_equation/systems-of-equation/http://www.mathwarehouse.com/algebra/linear_equation/systems-of-equation/http://www.mathwarehouse.com/algebra/linear_equation/systems-of-equation/http://www.mathwarehouse.com/algebra/linear_equation/systems-of-equation/http://www.mathwarehouse.com/algebra/linear_equation/systems-of-equation/
  • 7/27/2019 3d drawing in matlab

    31/41

    The other common example of systems of three variables equations that have

    no solution is pictured below. In the case below, each plane intersects the

    other two planes. However, there is no single point at which all three

    planes meet. Therefore, the system of 3 variable equations below has no

    solution.

  • 7/27/2019 3d drawing in matlab

    32/41

    One Solution of three variable systems

    If the three planes intersect as pictured below then the three variable system

    has 1 point in common, and a single solution represented by the black point

    below.

  • 7/27/2019 3d drawing in matlab

    33/41

    Infinite Solutions of three variable systems

    If the three planes intersect as pictured below then the three variable system

    has a line of intersection and therefore an infinite number of solutions.

  • 7/27/2019 3d drawing in matlab

    34/41

    Before attempting to solve systems of three variable equations using elimination, you

    should probably be comfortable solving 2 variable systems of linear equations using

    eliminationExample of how to solve a system of three variable equations using elimination.

    http://www.mathwarehouse.com/algebra/linear_equation/systems-of-equation/index.php#eliminationhttp://www.mathwarehouse.com/algebra/linear_equation/systems-of-equation/index.php#eliminationhttp://www.mathwarehouse.com/algebra/linear_equation/systems-of-equation/index.php#eliminationhttp://www.mathwarehouse.com/algebra/linear_equation/systems-of-equation/index.php#elimination
  • 7/27/2019 3d drawing in matlab

    35/41

  • 7/27/2019 3d drawing in matlab

    36/41

  • 7/27/2019 3d drawing in matlab

    37/41

    Practice Problems

    Problem 1) Use elimination to solve the following system of three variable equations.

    4x + 2y 2z = 10

    2x + 8y + 4z = 32 30x + 12y 4z = 24

    Solution

    Top

    Hello, I posted this several weeks ago in another forum, but I never really got a

    good answer. Could someone please take a look at this an tell me if it's

    mathematically valid?Thanks!

    Do Equations in More Than Three Variables Represent Graphs in Higher

    Dimensions?

    --------------------------------------------------------------------------------

    Hey, first of all, I'd like to apologize if I'm posting this in the wrong forum. I wasn't

    sure whether I should post it here or in the mathematics forum. Recently I was

    going through an Algebra book, and I saw a chapter on solving linear equations in

    three variables. The book explained how these sets of equations can be solved using

    elimination, matrices, Cramer's rule, etc. Anyway, I worked several of these

    problems. When I was finished, just out of curiosity, I wondered what it would be

    like if I set up five sets of equations with five variables, and solved them. I created

    one, and using my preferred technique, elimination, I went about solving it and it

    went MUCH more smoothly than I expected it would. When I was finished, I had

    the values that I had started out with, and it had all worked out fine. I used fivevariables X, Y, Z, K, and J. When I had finished, I went back to the book I was

    using and saw that linear sentences in two variables represented graphs in two

    dimensions, and linear equations in three variables represent graphs in three

    dimensions. So here's my question: Do sets of equations with more than three

    variables represent graphs in higher dimensions?

    P.S: Here are the equations I worked. Feel free to point out anything that I may have

    done wrong.

    2x+4y-1z-6k+2j=-1

    http://www.mathwarehouse.com/algebra/planes/systems/three-variable-equations.php#tophttp://www.mathwarehouse.com/algebra/planes/systems/three-variable-equations.php#top
  • 7/27/2019 3d drawing in matlab

    38/41

    3x+6y-3z-8k+4j=1

    1x+3y+4z-2k+4j=47

    4x-2y-2z+6k+2j=28

    5x+3y+4z+3k+3j=69

    (The values are X=2, Y=3, Z=5, K=4, J=6).

    Liger20

    View Public Profile

    Find More Posts by Liger20

    PhysOrg.com

    mathematics

    news on

    PhysOrg.com

    >> Tallis wasright: Numbers

    predict home win

    for QLD

    >> Predicting

    random violence

    by mathematics

    >> Math wars:

    Debate sparks

    anti-pi day

    Dec21-

    07, 03:31

    PM

    #2

    HallsofIvy

    HallsofIvy

    is Offline:

    Posts:

    30,415

    Originally Posted by Liger20

    Hello, I posted this several weeks ago in

    another forum, but I never really got a good

    answer. Could someone please take a look at

    this an tell me if it's mathematically valid?

    Thanks!

    Do Equations in More Than Three Variables

    Represent Graphs in Higher Dimensions?

    ----------------------------------------------------------

    ----------------------

    http://www.physicsforums.com/member.php?u=83191http://www.physicsforums.com/search.php?do=finduser&u=83191http://www.physorg.com/science-news/mathematics/http://www.physorg.com/science-news/mathematics/http://www.physorg.com/news229057379.htmlhttp://www.physorg.com/news229057379.htmlhttp://www.physorg.com/news229057379.htmlhttp://www.physorg.com/news229057379.htmlhttp://www.physorg.com/news228742466.htmlhttp://www.physorg.com/news228742466.htmlhttp://www.physorg.com/news228742466.htmlhttp://www.physorg.com/news228544512.htmlhttp://www.physorg.com/news228544512.htmlhttp://www.physorg.com/news228544512.htmlhttp://www.physicsforums.com/showpost.php?p=1548976&postcount=2http://www.physicsforums.com/member.php?u=331http://www.physicsforums.com/showthread.php?p=1548970#post1548970http://www.physicsforums.com/member.php?u=83191http://www.physicsforums.com/search.php?do=finduser&u=83191http://www.physorg.com/science-news/mathematics/http://www.physorg.com/science-news/mathematics/http://www.physorg.com/news229057379.htmlhttp://www.physorg.com/news229057379.htmlhttp://www.physorg.com/news229057379.htmlhttp://www.physorg.com/news228742466.htmlhttp://www.physorg.com/news228742466.htmlhttp://www.physorg.com/news228742466.htmlhttp://www.physorg.com/news228544512.htmlhttp://www.physorg.com/news228544512.htmlhttp://www.physorg.com/news228544512.htmlhttp://www.physicsforums.com/showpost.php?p=1548976&postcount=2http://www.physicsforums.com/member.php?u=331
  • 7/27/2019 3d drawing in matlab

    39/41

    Hey, first of all, I'd like to apologize if I'm

    posting this in the wrong forum. I wasn't sure

    whether I should post it here or in the

    mathematics forum. Recently I was going

    through an Algebra book, and I saw a chapteron solving linear equations in three variables.

    The book explained how these sets of equations

    can be solved using elimination, matrices,

    Cramer's rule, etc. Anyway, I worked several of

    these problems. When I was finished, just out of

    curiosity, I wondered what it would be like if I

    set up five sets of equations with five variables,

    and solved them. I created one, and using my

    preferred technique, elimination, I went about

    solving it and it went MUCH more smoothly

    than I expected it would. When I was finished, Ihad the values that I had started out with, and it

    had all worked out fine. I used five variables X,

    Y, Z, K, and J. When I had finished, I went back

    to the book I was using and saw that linear

    sentences in two variables represented graphs

    in two dimensions, and linear equations in three

    variables represent graphs in three dimensions.

    So here's my question: Do sets of equations

    with more than three variables represent

    graphs in higher dimensions?

    P.S: Here are the equations I worked. Feel free

    to point out anything that I may have done

    wrong.

    2x+4y-1z-6k+2j=-1

    3x+6y-3z-8k+4j=1

    1x+3y+4z-2k+4j=47

    4x-2y-2z+6k+2j=28

    5x+3y+4z+3k+3j=69

    (The values are X=2, Y=3, Z=5, K=4, J=6).

    Actually, I would have put it the other way

    around: a graph represents an equation. Equations

    don't necessarily "represent" graphs or anything

    else. An equation is itself and, if it was derived

    from some application, represents whatever the

    application is about.

    However, it certainly is possible to associate anequation in several variables with a graph. In this

  • 7/27/2019 3d drawing in matlab

    40/41

    case, you have 5 linear equations in 5 variables. It

    would be possible to solve each of those equations

    for any one of the variables "in terms of" the other

    4. Given any one of those 4 values, the 5th is

    determined. Yes, we could set up a "5

    dimensional" coordinate system and each equation

    would "represent" (or be represented by) a "hyper-

    plane" in 5 dimensions.

    HallsofIvy

    View Public Profile

    Find More Posts by HallsofIvy

    Share it

    Facebook it!

    Twitter it!

    Slashdot it!

    Digg it!

    StumbleUpon it!

    del.icio.us it!

    Thread Tools

    Show Printable Version

    Email this Page

    Similar Threads for: Do Equations in More Than Three Variables Represent

    Graphs in Higher Dimensions?

    Thread Forum Replies

    What does the other 7- Beyond the Standard Model 13

    http://www.physicsforums.com/member.php?u=331http://www.physicsforums.com/search.php?do=finduser&u=331http://www.facebook.com/share.php?u=http://www.physicsforums.com/showthread.php?t=205632http://twitter.com/home/?status=Do%20Equations%20in%20More%20Than%20Three%20Variables%20Represent%20Graphs%20in%20Higher%20Dimensions?+http://www.physicsforums.com/showthread.php?t=205632http://slashdot.org/submit.plhttp://digg.com/submit?phrase=2&url=http://www.physicsforums.com/showthread.php?t=205632&title=Do%20Equations%20in%20More%20Than%20Three%20Variables%20Represent%20Graphs%20in%20Higher%20Dimensions?http://www.stumbleupon.com/submit?url=http://www.physicsforums.com/showthread.php?t=205632&title=Do%20Equations%20in%20More%20Than%20Three%20Variables%20Represent%20Graphs%20in%20Higher%20Dimensions?http://del.icio.us/post?url=http://www.physicsforums.com/showthread.php?t=205632&title=Do%20Equations%20in%20More%20Than%20Three%20Variables%20Represent%20Graphs%20in%20Higher%20Dimensions?http://www.physicsforums.com/printthread.php?t=205632http://www.physicsforums.com/sendmessage.php?do=sendtofriend&t=205632http://www.physicsforums.com/showthread.php?t=40155http://www.physicsforums.com/showthread.php?t=205632#tophttp://www.physicsforums.com/newreply.php?do=newreply&noquote=1&p=1548976http://www.physicsforums.com/member.php?u=331http://www.physicsforums.com/search.php?do=finduser&u=331http://www.facebook.com/share.php?u=http://www.physicsforums.com/showthread.php?t=205632http://twitter.com/home/?status=Do%20Equations%20in%20More%20Than%20Three%20Variables%20Represent%20Graphs%20in%20Higher%20Dimensions?+http://www.physicsforums.com/showthread.php?t=205632http://slashdot.org/submit.plhttp://digg.com/submit?phrase=2&url=http://www.physicsforums.com/showthread.php?t=205632&title=Do%20Equations%20in%20More%20Than%20Three%20Variables%20Represent%20Graphs%20in%20Higher%20Dimensions?http://www.stumbleupon.com/submit?url=http://www.physicsforums.com/showthread.php?t=205632&title=Do%20Equations%20in%20More%20Than%20Three%20Variables%20Represent%20Graphs%20in%20Higher%20Dimensions?http://del.icio.us/post?url=http://www.physicsforums.com/showthread.php?t=205632&title=Do%20Equations%20in%20More%20Than%20Three%20Variables%20Represent%20Graphs%20in%20Higher%20Dimensions?http://www.physicsforums.com/printthread.php?t=205632http://www.physicsforums.com/sendmessage.php?do=sendtofriend&t=205632http://www.physicsforums.com/showthread.php?t=40155
  • 7/27/2019 3d drawing in matlab

    41/41

    Similar Threads for: Do Equations in More Than Three Variables Represent

    Graphs in Higher Dimensions?

    dimensions represent?

    Maxwell equations in higher

    dimensionsClassical Physics 3

    curl or maxwell equations in

    higher dimensionsTopology & Geometry

    http://www.physicsforums.com/showthread.php?t=40155http://www.physicsforums.com/showthread.php?t=40155http://www.physicsforums.com/showthread.php?t=240918http://www.physicsforums.com/showthread.php?t=240918http://www.physicsforums.com/showthread.php?t=211215http://www.physicsforums.com/showthread.php?t=211215http://www.physicsforums.com/showthread.php?t=40155http://www.physicsforums.com/showthread.php?t=240918http://www.physicsforums.com/showthread.php?t=240918http://www.physicsforums.com/showthread.php?t=211215http://www.physicsforums.com/showthread.php?t=211215