Results 1 to 8 of 8

Math Help - Mathematica problem when defining determinant

  1. #1
    Newbie
    Joined
    Jan 2011
    Posts
    4

    Mathematica problem when defining determinant

    hi everyone.

    Iam having a little trouble with mathematica. Everytime i pass in a matrix, which include a variable, i get an error.

    eg. if i pass:
    Det[{0, a, 0}, {a, 0, 0}, {1, 1, 1}]

    i get the following error:
    Det::nonopt: "Options expected (instead of {1,1,1}) beyond position 1 in "
    Follow Math Help Forum on Facebook and Google+

  2. #2
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Try this instead:

    Det[{{0, a, 0}, {a, 0, 0}, {1, 1, 1}}].
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jan 2011
    Posts
    4
    Nope didīnt help either. Instead i got this error:

    Det::matsq: Argument
    Follow Math Help Forum on Facebook and Google+

  4. #4
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Is this Mathematica or MATLAB? Check your syntax carefully. Make sure everything's a comma where it needs to be. The command I gave you I copied and pasted into Mathematica, and it worked. (I got -a^{2}.)
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Jan 2011
    Posts
    4
    Yes it is for mathematica. Well i still cant see why i get this error, i have uploaded the file here: http://dl.dropbox.com/u/17152205/det_test%202.zip

    maybe this can help you to see what i am doing wron. Btw. thanks for your help so far
    Follow Math Help Forum on Facebook and Google+

  6. #6
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Ok, I think your problem is this: the variable a has been defined elsewhere, looks like in another notebook file. In fact, it's been assigned the value

    a = {{-2, 2, 0}, {2, -2, 0}, {1, 1, -1}}.

    Try executing this command:

    Clear["@"]

    and then trying again.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Jan 2011
    Posts
    4
    Thanks, i tried to use another variable than a and that worked. Afterall i posted the clear command and it gave me the following msg:
    Clear::wrsym: Symbol \[FormalA] is Protected. >>

    Is there some way to make a not protected?
    Follow Math Help Forum on Facebook and Google+

  8. #8
    A Plied Mathematician
    Joined
    Jun 2010
    From
    CT, USA
    Posts
    6,318
    Thanks
    4
    Awards
    2
    Not sure why a should be protected. It isn't normally. But then, you have a Mac. I wonder if that changes things. But then, why a should be assigned that particular matrix, I have no idea. I'm not sure I can help you there.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. defining of the function (Mathematica)
    Posted in the Math Software Forum
    Replies: 0
    Last Post: October 24th 2011, 02:36 AM
  2. Defining a function in mathematica
    Posted in the Math Software Forum
    Replies: 1
    Last Post: March 22nd 2010, 08:36 AM
  3. Problem defining a function
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: January 21st 2009, 10:45 AM
  4. Defining a function [Mathematica]
    Posted in the Math Software Forum
    Replies: 6
    Last Post: September 28th 2008, 12:13 PM
  5. problem with defining a function
    Posted in the Advanced Math Topics Forum
    Replies: 3
    Last Post: August 29th 2005, 07:23 AM

Search Tags


/mathhelpforum @mathhelpforum